Update README.md
Browse files
README.md
CHANGED
@@ -1,17 +1,15 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
-
library_name: diffusers
|
4 |
---
|
5 |
Diffusers formation for mochi-1-preview model.
|
6 |
|
7 |
-
Use following code to inference
|
8 |
|
9 |
```bash
|
10 |
import torch
|
11 |
from diffusers import MochiPipeline
|
12 |
from diffusers.utils import export_to_video
|
13 |
-
|
14 |
-
pipe = MochiPipeline.from_pretrained('HanLiii/mochi-1-preview-diffusers', torch_dtype=torch.float16)
|
15 |
pipe.to("cuda")
|
16 |
prompt = """
|
17 |
A hand with delicate fingers picks up a bright yellow lemon from a wooden bowl
|
@@ -28,11 +26,12 @@ frames = pipe(prompt,
|
|
28 |
num_frames=61,
|
29 |
generator=torch.Generator(device="cuda").manual_seed(42),
|
30 |
).frames[0]
|
31 |
-
|
32 |
export_to_video(frames, "mochi_test.mp4")
|
33 |
```
|
34 |
-
|
35 |
-
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/
|
|
|
|
|
36 |
|
37 |
---
|
38 |
license: apache-2.0
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
3 |
---
|
4 |
Diffusers formation for mochi-1-preview model.
|
5 |
|
6 |
+
##Use following code to inference
|
7 |
|
8 |
```bash
|
9 |
import torch
|
10 |
from diffusers import MochiPipeline
|
11 |
from diffusers.utils import export_to_video
|
12 |
+
pipe = MochiPipeline.from_pretrained('HanLiii/mochi-1-preview-diffusers', torch_dtype=torch.bfloat16)
|
|
|
13 |
pipe.to("cuda")
|
14 |
prompt = """
|
15 |
A hand with delicate fingers picks up a bright yellow lemon from a wooden bowl
|
|
|
26 |
num_frames=61,
|
27 |
generator=torch.Generator(device="cuda").manual_seed(42),
|
28 |
).frames[0]
|
|
|
29 |
export_to_video(frames, "mochi_test.mp4")
|
30 |
```
|
31 |
+
fp16 diffusers version result:
|
32 |
+
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/647d3f9683cdb93baf76f963/0YoDABzUbfErx2McV4LA6.mp4"></video>
|
33 |
+
github version result:
|
34 |
+
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/647d3f9683cdb93baf76f963/OY29N7HQK2TVSZcAXQAPx.mp4"></video>
|
35 |
|
36 |
---
|
37 |
license: apache-2.0
|