Downloads · 30 days
0
saradha12/Text_to_vid
Text_to_vid is a machine learning model from saradha12. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a text-to-video diffusion model trained to generate video frames from text prompts.
Downloads · 30 days
0
Access
Public
Updated Jul 13, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
.ipynb70.5 KB · 97%
From the Hugging Face model README
This is a text-to-video diffusion model trained to generate video frames from text prompts.
import torch
from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
from diffusers.utils import export_to_video
pipe = DiffusionPipeline.from_pretrained("your-username/text-to-video-diffusion", torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe.enable_model_cpu_offload()
prompt = "Spiderman is surfing"
video_frames = pipe(prompt, num_inference_steps=25).frames
video_path = export_to_video(video_frames)