File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
src/diffusers/pipelines/allegro Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 5353 Examples:
5454 ```py
5555 >>> import torch
56+ >>> from diffusers import AutoencoderKLAllegro, AllegroPipeline
57+ >>> from diffusers.utils import export_to_video
5658
57- >>> # You can replace the your_path_to_model with your own path.
58- >>> pipe = AllegroPipeline.from_pretrained(
59- ... your_path_to_model, torch_dtype=torch.float16, trust_remote_code=True
60- ... )
59+ >>> vae = AutoencoderKLAllegro.from_pretrained("rhymes-ai/Allegro", subfolder="vae", torch_dtype=torch.float32)
60+ >>> pipe = AllegroPipeline.from_pretrained("rhymes-ai/Allegro", vae=vae, torch_dtype=torch.bfloat16).to("cuda")
6161
62- >>> prompt = "A small cactus with a happy face in the Sahara desert."
63- >>> image = pipe(prompt).video[0]
62+ >>> prompt = (
63+ ... "A seaside harbor with bright sunlight and sparkling seawater, with many boats in the water. From an aerial view, "
64+ ... "the boats vary in size and color, some moving and some stationary. Fishing boats in the water suggest that this "
65+ ... "location might be a popular spot for docking fishing boats."
66+ ... )
67+ >>> video = pipe(prompt, guidance_scale=7.5, max_sequence_length=512).frames[0]
68+ >>> export_to_video(video, "output.mp4", fps=15)
6469 ```
6570"""
6671
You can’t perform that action at this time.
0 commit comments