Run this model with HF Jobs
Run Wan-AI/Wan2.1-T2V-1.3B-Diffusers on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Wan-AI/Wan2.1-T2V-1.3B-Diffusers on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Wan-AI/Wan2.1-T2V-1.3B-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Wan-AI/Wan2.1-T2V-1.3B-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Wan-AI/Wan2.1-T2V-1.3B-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
#2
by a-r-r-o-w - opened
53 unmodified lines5455565758596061626364656696 unmodified lines16316416516616716853 unmodified lines- [x] Multi-GPU Inference code of the 14B and 1.3B models- [x] Checkpoints of the 14B and 1.3B models- [x] Gradio demo- [ ] Diffusers integration- [ ] ComfyUI integration- Wan2.1 Image-to-Video- [x] Multi-GPU Inference code of the 14B model- [x] Checkpoints of the 14B model- [x] Gradio demo- [ ] Diffusers integration- [ ] ComfyUI integration96 unmodified linestorchrun --nproc_per_node=8 generate.py --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --dit_fsdp --t5_fsdp --ulysses_size 8 --sample_shift 8 --sample_guide_scale 6 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."```##### (2) Using Prompt Extention53 unmodified lines5455565758596061626364656696 unmodified lines16316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319453 unmodified lines- [x] Multi-GPU Inference code of the 14B and 1.3B models- [x] Checkpoints of the 14B and 1.3B models- [x] Gradio demo- [x] Diffusers integration- [ ] ComfyUI integration- Wan2.1 Image-to-Video- [x] Multi-GPU Inference code of the 14B model- [x] Checkpoints of the 14B model- [x] Gradio demo- [x] Diffusers integration- [ ] ComfyUI integration96 unmodified linestorchrun --nproc_per_node=8 generate.py --task t2v-1.3B --size 832*480 --ckpt_dir ./Wan2.1-T2V-1.3B --dit_fsdp --t5_fsdp --ulysses_size 8 --sample_shift 8 --sample_guide_scale 6 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."```Wan can also be run directly using 🤗 Diffusers!```pythonimport torchfrom diffusers import AutoencoderKLWan, WanPipelinefrom diffusers.utils import export_to_video# Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusersmodel_id = "Wan-AI/Wan2.1-T2V-1.3B-Diffusers"vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)pipe.to("cuda")prompt = "A cat walks on the grass, realistic"negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"output = pipe(prompt=prompt,negative_prompt=negative_prompt,height=480,width=832,num_frames=81,guidance_scale=5.0).frames[0]export_to_video(output, "output.mp4", fps=15)```##### (2) Using Prompt Extention
README.md+28-2