File size: 1,449 Bytes
080427d
a2705f0
080427d
a2705f0
 
7b28cba
d159b93
a2705f0
324e6c0
a2705f0
 
a6ac9d6
a2705f0
324e6c0
 
 
 
 
 
 
 
 
a2705f0
324e6c0
a2705f0
 
 
 
324e6c0
a2705f0
918db9b
38aca22
 
 
918db9b
38aca22
a6ac9d6
d159b93
a2705f0
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
license: apache-2.0
---
Diffusers formation for mochi-1-preview model. 

Use following code to inference

```bash
import torch 
from diffusers import MochiPipeline
from diffusers.utils import export_to_video
pipe = MochiPipeline.from_pretrained('HanLiii/mochi-1-preview-diffusers', torch_dtype=torch.bfloat16)
pipe.to("cuda")
prompt = """
A hand with delicate fingers picks up a bright yellow lemon from a wooden bowl 
filled with lemons and sprigs of mint against a peach-colored background. 
The hand gently tosses the lemon up and catches it, showcasing its smooth texture. 
A beige string bag sits beside the bowl, adding a rustic touch to the scene. 
Additional lemons, one halved, are scattered around the base of the bowl. 
The even lighting enhances the vibrant colors and creates a fresh, 
inviting atmosphere.
"""
frames = pipe(prompt, 
    num_inference_steps=64, 
    guidance_scale=4.5,
    num_frames=61,
    generator=torch.Generator(device="cuda").manual_seed(42),
).frames[0]
export_to_video(frames, "mochi_test.mp4")
```
bf16 diffusers version result(num_frames=61):

<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/647d3f9683cdb93baf76f963/83xA9RMgF4Rx3M1P-deav.mp4"></video>

github version result(num_frames=163):

<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/647d3f9683cdb93baf76f963/OY29N7HQK2TVSZcAXQAPx.mp4"></video>

---
license: apache-2.0
---