HanLiii's picture
Update README.md
324e6c0 verified
|
raw
history blame
2.01 kB
metadata
license: apache-2.0

Diffusers formation for mochi-1-preview model.

It was create by scripts: https://github.com/huggingface/diffusers/blob/mochi/scripts/convert_mochi_to_diffusers.py The model can be directly load from pretrained with mochi branch: https://github.com/huggingface/diffusers/tree/mochi

import torch 
from diffusers import MochiPipeline
from diffusers.utils import export_to_video

pipe = MochiPipeline.from_pretrained('HanLiii/mochi-1-preview-diffusers', torch_dtype=torch.float16)
pipe.to("cuda")
prompt = """
A hand with delicate fingers picks up a bright yellow lemon from a wooden bowl 
filled with lemons and sprigs of mint against a peach-colored background. 
The hand gently tosses the lemon up and catches it, showcasing its smooth texture. 
A beige string bag sits beside the bowl, adding a rustic touch to the scene. 
Additional lemons, one halved, are scattered around the base of the bowl. 
The even lighting enhances the vibrant colors and creates a fresh, 
inviting atmosphere.
"""
frames = pipe(prompt, 
    num_inference_steps=64, 
    guidance_scale=4.5,
    num_frames=61,
    generator=torch.Generator(device="cuda").manual_seed(42),
).frames[0]

export_to_video(frames, "mochi_test.mp4")

Some generated results: Pretty thanks for the discussion in https://github.com/huggingface/diffusers/pull/9769 11.04 updation for vae encoder releasing.

license: apache-2.0