a-r-r-o-w HF staff commited on
Commit
ac6cd3a
·
verified ·
1 Parent(s): bc0bd68

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -2
README.md CHANGED
@@ -51,13 +51,13 @@ This repository features our T2V-14B model, which establishes a new SOTA perform
51
  - [x] Multi-GPU Inference code of the 14B and 1.3B models
52
  - [x] Checkpoints of the 14B and 1.3B models
53
  - [x] Gradio demo
54
- - [ ] Diffusers integration
55
  - [ ] ComfyUI integration
56
  - Wan2.1 Image-to-Video
57
  - [x] Multi-GPU Inference code of the 14B model
58
  - [x] Checkpoints of the 14B model
59
  - [x] Gradio demo
60
- - [ ] Diffusers integration
61
  - [ ] ComfyUI integration
62
 
63
 
@@ -159,6 +159,32 @@ pip install "xfuser>=0.4.1"
159
  torchrun --nproc_per_node=8 generate.py --task t2v-14B --size 1280*720 --ckpt_dir ./Wan2.1-T2V-14B --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
160
  ```
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
 
163
  ##### (2) Using Prompt Extention
164
 
 
51
  - [x] Multi-GPU Inference code of the 14B and 1.3B models
52
  - [x] Checkpoints of the 14B and 1.3B models
53
  - [x] Gradio demo
54
+ - [x] Diffusers integration
55
  - [ ] ComfyUI integration
56
  - Wan2.1 Image-to-Video
57
  - [x] Multi-GPU Inference code of the 14B model
58
  - [x] Checkpoints of the 14B model
59
  - [x] Gradio demo
60
+ - [x] Diffusers integration
61
  - [ ] ComfyUI integration
62
 
63
 
 
159
  torchrun --nproc_per_node=8 generate.py --task t2v-14B --size 1280*720 --ckpt_dir ./Wan2.1-T2V-14B --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Two anthropomorphic cats in comfy boxing gear and bright gloves fight intensely on a spotlighted stage."
160
  ```
161
 
162
+ Wan can also be run directly using 🤗 Diffusers!
163
+
164
+ ```python
165
+ import torch
166
+ from diffusers import AutoencoderKLWan, WanPipeline
167
+ from diffusers.utils import export_to_video
168
+
169
+ # Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusers
170
+ model_id = "Wan-AI/Wan2.1-T2V-14B-Diffusers"
171
+ vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
172
+ pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
173
+ pipe.to("cuda")
174
+
175
+ prompt = "A cat walks on the grass, realistic"
176
+ 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"
177
+
178
+ output = pipe(
179
+ prompt=prompt,
180
+ negative_prompt=negative_prompt,
181
+ height=480,
182
+ width=832,
183
+ num_frames=81,
184
+ guidance_scale=5.0
185
+ ).frames[0]
186
+ export_to_video(output, "output.mp4", fps=15)
187
+ ```
188
 
189
  ##### (2) Using Prompt Extention
190