Instructions to use InsecureErasure/Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use InsecureErasure/Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-NVFP4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("InsecureErasure/Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-NVFP4", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Diffusion Single File
How to use InsecureErasure/Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-NVFP4 with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Upload new safetensors quant and rank 64 LoRA
Browse filesReplace FP8 layers with MXFP8
```bash
#!/bin/bash
convert_to_quant -i "${1}" \
--nvfp4 --wan --comfy_quant --save-quant-metadata \
--custom-type mxfp8 \
--custom-layers "blocks\.(1|2|3)\.cross_attn\.k\.weight|blocks\.(6|8|9|10)\.cross_attn\.k\.weight|blocks\.(0|1|2|3)\.cross_attn\.v\.weight|blocks\.(6)\.cross_attn\.q\.weight|blocks\.(6|14)\.cross_attn\.o\.weight|blocks\.(0|1|2|3)\.cross_attn\.v_img\.weight|blocks\.(0)\.self_attn\.k\.weight|blocks\.(7|9|10|12|13|14)\.self_attn\.k\.weight|blocks\.(19)\.self_attn\.q\.weight|blocks\.(0|1|2|3)\.ffn\.0\.weight|blocks\.(36|37|38|39)\.ffn\.0\.weight" \
--exclude-layers "blocks\.(4|5|7)\.cross_attn\.k\.weight|blocks\.(0)\.cross_attn\.q\.weight|blocks\.(5|7|9|10|11|12|19|20)\.cross_attn\.o\.weight|blocks\.(8|11|33)\.self_attn\.k\.weight|blocks\.(38)\.self_attn\.k\.weight|blocks\.(14|16|17)\.self_attn\.q\.weight" \
--num-iter 6000 \
--top-p 0.35 \
--calib-samples 8192 \
--extract-lora --lora-rank 64 \
--lora-target "ffn\.(0|2)\.weight|self_attn\.(v|o)\.weight" \
-o "${1%%.safetensors}-nvfp4-mxfp8.safetensors"
```
|
@@ -2,3 +2,4 @@ assets/img_lightx2v.png filter=lfs diff=lfs merge=lfs -text
|
|
| 2 |
Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-nvfp4.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 3 |
assets/wan21_input_cat.png filter=lfs diff=lfs merge=lfs -text
|
| 4 |
assets/wan21_output_cat.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 2 |
Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-nvfp4.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 3 |
assets/wan21_input_cat.png filter=lfs diff=lfs merge=lfs -text
|
| 4 |
assets/wan21_output_cat.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
Wan2.1-I2V-14B-480P-StepDistill-CfgDistill-Lightx2v-r64-lora.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:09bd9947c1e0c70f662beec402351e4b965d9ad3ef15ba139cff3fb2a02b6bc8
|
| 3 |
+
size 10878111539
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a1c2c8832016fc711d6540d20709ff5a6e7ad5a66edcc27389949be467b8975
|
| 3 |
+
size 616079752
|