File size: 592 Bytes
9b4ba28
 
0a5a0cf
 
 
 
 
 
 
c4a5bc5
 
9b4ba28
 
0a5a0cf
 
 
9b4ba28
0a5a0cf
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
library_name: diffusers
license: apache-2.0
language:
- en
tags:
- diffusers
- text-to-video
- Mochi
base_model:
- genmo/mochi-1-preview
---

```python
from diffusers import MochiPipeline
from diffusers.utils import export_to_video

pipe = MochiPipeline.from_pretrained(VikramSingh178/mochi-diffuser-bf16, torch_dtype=torch.bfloat16)
pipe.to("cuda")
prompt = "A beautiful sunset over the mountains"
frames = pipe(prompt, num_inference_steps=50, guidance_scale=4.5,num_frames=61,generator=torch.Generator(device="cuda").manual_seed(42),).frames[0]
export_to_video(frames, "sunset.mp4")
```