Update README.md
Browse files
README.md
CHANGED
@@ -53,13 +53,13 @@ This repo contains our I2V-14B model, which is capable of generating 480P videos
|
|
53 |
- [x] Multi-GPU Inference code of the 14B and 1.3B models
|
54 |
- [x] Checkpoints of the 14B and 1.3B models
|
55 |
- [x] Gradio demo
|
56 |
-
- [
|
57 |
- [ ] ComfyUI integration
|
58 |
- Wan2.1 Image-to-Video
|
59 |
- [x] Multi-GPU Inference code of the 14B model
|
60 |
- [x] Checkpoints of the 14B model
|
61 |
- [x] Gradio demo
|
62 |
-
- [
|
63 |
- [ ] ComfyUI integration
|
64 |
|
65 |
|
@@ -151,6 +151,33 @@ pip install "xfuser>=0.4.1"
|
|
151 |
torchrun --nproc_per_node=8 generate.py --task i2v-14B --size 832*480 --ckpt_dir ./Wan2.1-I2V-14B-480P --image examples/i2v_input.JPG --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
152 |
```
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
##### (2) Using Prompt Extention
|
155 |
|
156 |
Run with local prompt extention using `Qwen/Qwen2.5-VL-7B-Instruct`:
|
|
|
53 |
- [x] Multi-GPU Inference code of the 14B and 1.3B models
|
54 |
- [x] Checkpoints of the 14B and 1.3B models
|
55 |
- [x] Gradio demo
|
56 |
+
- [x] Diffusers integration
|
57 |
- [ ] ComfyUI integration
|
58 |
- Wan2.1 Image-to-Video
|
59 |
- [x] Multi-GPU Inference code of the 14B model
|
60 |
- [x] Checkpoints of the 14B model
|
61 |
- [x] Gradio demo
|
62 |
+
- [x] Diffusers integration
|
63 |
- [ ] ComfyUI integration
|
64 |
|
65 |
|
|
|
151 |
torchrun --nproc_per_node=8 generate.py --task i2v-14B --size 832*480 --ckpt_dir ./Wan2.1-I2V-14B-480P --image examples/i2v_input.JPG --dit_fsdp --t5_fsdp --ulysses_size 8 --prompt "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
152 |
```
|
153 |
|
154 |
+
Wan can also be run directly using 🤗 Diffusers!
|
155 |
+
|
156 |
+
```python
|
157 |
+
import torch
|
158 |
+
from diffusers import AutoencoderKLWan, WanPipeline
|
159 |
+
from diffusers.utils import export_to_video
|
160 |
+
|
161 |
+
# Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusers
|
162 |
+
model_id = "Wan-AI/Wan2.1-T2V-14B-Diffusers"
|
163 |
+
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
|
164 |
+
pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
|
165 |
+
pipe.to("cuda")
|
166 |
+
|
167 |
+
prompt = "A cat walks on the grass, realistic"
|
168 |
+
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"
|
169 |
+
|
170 |
+
output = pipe(
|
171 |
+
prompt=prompt,
|
172 |
+
negative_prompt=negative_prompt,
|
173 |
+
height=480,
|
174 |
+
width=832,
|
175 |
+
num_frames=81,
|
176 |
+
guidance_scale=5.0
|
177 |
+
).frames[0]
|
178 |
+
export_to_video(output, "output.mp4", fps=15)
|
179 |
+
```
|
180 |
+
|
181 |
##### (2) Using Prompt Extention
|
182 |
|
183 |
Run with local prompt extention using `Qwen/Qwen2.5-VL-7B-Instruct`:
|