Views
No views yet
pip install git+https://github.com/huggingface/diffusers, it can be loaded normally and used in a pipeline like so:1from diffusers import MochiPipeline, MochiTransformer3DModel
2from diffusers.utils import export_to_video
3import torch
4transformer = MochiTransformer3DModel.from_pretrained("imnotednamode/mochi-1-preview-mix-nf4", torch_dtype=torch.bfloat16)
5pipe = MochiPipeline.from_pretrained("genmo/mochi-1-preview", revision="refs/pr/18", torch_dtype=torch.bfloat16, transformer=transformer)
6pipe.enable_model_cpu_offload()
7pipe.enable_vae_tiling()
8frames = pipe("A camera follows a squirrel running around on a tree branch", num_inference_steps=100, guidance_scale=4.5, height=480, width=848, num_frames=161).frames[0]
9export_to_video(frames, "mochi.mp4", fps=15)