svjack commited on
Commit
49d522f
1 Parent(s): 8191ffa

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +35 -0
README.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```python
2
+ from diffusers import MochiPipeline
3
+ from diffusers.utils import export_to_video
4
+ import torch
5
+
6
+ pipe = MochiPipeline.from_pretrained("genmo/mochi-1-preview", torch_dtype = torch.float16)
7
+ pipe.load_lora_weights("svjack/mochi_mickey_mice_early_lora")
8
+ pipe.enable_model_cpu_offload()
9
+ pipe.enable_sequential_cpu_offload()
10
+ pipe.vae.enable_slicing()
11
+ pipe.vae.enable_tiling()
12
+
13
+ i = 50
14
+ generator = torch.Generator("cpu").manual_seed(i)
15
+ pipeline_args = {
16
+ "prompt": "A black and white animated scene unfolds with two anthropomorphic Mickey Mice sitting at a table, each holding a glass of wine. The musical notes and symbols float around them, suggesting a playful environment. One Mickey leans forward in curiosity, while the other remains still, sipping his drink. The dynamics shift as one Mickey raises his glass in a toast, and the other responds by clinking glasses. The scene captures the camaraderie and enjoyment between the two characters in a whimsical, animated setting, emphasizing their interactions and emotions.",
17
+ "guidance_scale": 6.0,
18
+ "num_inference_steps": 64,
19
+ "height": 480,
20
+ "width": 848,
21
+ "max_sequence_length": 256,
22
+ "output_type": "np",
23
+ "num_frames": 19,
24
+ "generator": generator
25
+ }
26
+
27
+ video = pipe(**pipeline_args).frames[0]
28
+ export_to_video(video, "black_white_drinking_scene.mp4")
29
+ from IPython import display
30
+ display.clear_output(wait = True)
31
+ display.Video("black_white_drinking_scene.mp4")
32
+ ```
33
+
34
+
35
+ <video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/LcpLsMd3L_PgXD7VbPIe1.mp4"></video>