HanLiii commited on
Commit
324e6c0
·
verified ·
1 Parent(s): a2705f0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -4
README.md CHANGED
@@ -6,18 +6,29 @@ Diffusers formation for mochi-1-preview model.
6
  It was create by scripts: https://github.com/huggingface/diffusers/blob/mochi/scripts/convert_mochi_to_diffusers.py
7
  The model can be directly load from pretrained with mochi branch: https://github.com/huggingface/diffusers/tree/mochi
8
  ```bash
 
9
  from diffusers import MochiPipeline
10
  from diffusers.utils import export_to_video
11
- pipe = MochiPipeline.from_pretrained(model_path, torch_dtype=torch.bfloat16)
 
12
  pipe.to("cuda")
13
- prompt = "Close-up of a chameleon's eye, with its scaly skin changing color. Ultra high resolution 4k."
 
 
 
 
 
 
 
 
14
  frames = pipe(prompt,
15
- num_inference_steps=50,
16
  guidance_scale=4.5,
17
  num_frames=61,
18
  generator=torch.Generator(device="cuda").manual_seed(42),
19
  ).frames[0]
20
- export_to_video(frames, "mochi.mp4")
 
21
  ```
22
  Some generated results:
23
  <video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/62e34a12c9bece303d146af8/Cm3I6kidy2YP5nu3un7XP.mp4"></video>
 
6
  It was create by scripts: https://github.com/huggingface/diffusers/blob/mochi/scripts/convert_mochi_to_diffusers.py
7
  The model can be directly load from pretrained with mochi branch: https://github.com/huggingface/diffusers/tree/mochi
8
  ```bash
9
+ import torch
10
  from diffusers import MochiPipeline
11
  from diffusers.utils import export_to_video
12
+
13
+ pipe = MochiPipeline.from_pretrained('HanLiii/mochi-1-preview-diffusers', torch_dtype=torch.float16)
14
  pipe.to("cuda")
15
+ prompt = """
16
+ A hand with delicate fingers picks up a bright yellow lemon from a wooden bowl
17
+ filled with lemons and sprigs of mint against a peach-colored background.
18
+ The hand gently tosses the lemon up and catches it, showcasing its smooth texture.
19
+ A beige string bag sits beside the bowl, adding a rustic touch to the scene.
20
+ Additional lemons, one halved, are scattered around the base of the bowl.
21
+ The even lighting enhances the vibrant colors and creates a fresh,
22
+ inviting atmosphere.
23
+ """
24
  frames = pipe(prompt,
25
+ num_inference_steps=64,
26
  guidance_scale=4.5,
27
  num_frames=61,
28
  generator=torch.Generator(device="cuda").manual_seed(42),
29
  ).frames[0]
30
+
31
+ export_to_video(frames, "mochi_test.mp4")
32
  ```
33
  Some generated results:
34
  <video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/62e34a12c9bece303d146af8/Cm3I6kidy2YP5nu3un7XP.mp4"></video>