patrickvonplaten commited on
Commit
c8cbf2f
1 Parent(s): 4eb10ea

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -5
README.md CHANGED
@@ -40,17 +40,16 @@ Now, generate a video:
40
 
41
  ```python
42
  import torch
43
- from diffusers import TextToVideoMSPipeline, DPMSolverMultistepScheduler
44
  from diffusers.utils import export_to_video
45
 
46
- pipe = TextToVideoMSPipeline.from_pretrained("diffusers/ms-text-to-video-sd", torch_dtype=torch.float16)
47
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
48
- pipe = pipe.to("cuda")
49
 
50
  prompt = "Spiderman is surfing"
51
- video_frames = pipe(prompt).frames
52
  video_path = export_to_video(video_frames)
53
- print(video_path)
54
  ```
55
 
56
  Here are some results:
 
40
 
41
  ```python
42
  import torch
43
+ from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler
44
  from diffusers.utils import export_to_video
45
 
46
+ pipe = DiffusionPipeline.from_pretrained("damo-vilab/text-to-video-ms-1.7b", torch_dtype=torch.float16, variant="fp16")
47
  pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
48
+ pipe.enable_cpu_model_offload()
49
 
50
  prompt = "Spiderman is surfing"
51
+ video_frames = pipe(prompt, num_inference_steps=25).frames
52
  video_path = export_to_video(video_frames)
 
53
  ```
54
 
55
  Here are some results: