Views
No views yet
genmo/mochi-1-preview.1from diffusers import MochiPipeline
2from diffusers.utils import export_to_video
3import torch
4
5pipe = MochiPipeline.from_pretrained("genmo/mochi-1-preview")
6pipe.load_lora_weights("CHANGE_ME")
7pipe.enable_model_cpu_offload()
8
9with torch.autocast("cuda", torch.bfloat16):
10 video = pipe(
11 prompt="CHANGE_ME",
12 guidance_scale=6.0,
13 num_inference_steps=64,
14 height=480,
15 width=848,
16 max_sequence_length=256,
17 output_type="np"
18 ).frames[0]
19export_to_video(video)# TODO: add an example code snippet for running this diffusion pipeline