Views
No views yet
1from diffusers import MochiPipeline
2from diffusers.utils import export_to_video
3
4pipe = MochiPipeline.from_pretrained(model_path, torch_dtype=torch.bfloat16)
5pipe.to("cuda")
6prompt = "Close-up of a chameleon's eye, with its scaly skin changing color. Ultra high resolution 4k."
7frames = pipe(prompt,
8 num_inference_steps=50,
9 guidance_scale=4.5,
10 num_frames=61,
11 generator=torch.Generator(device="cuda").manual_seed(42),
12).frames[0]
13
14export_to_video(frames, "mochi.mp4")