Image-to-Video
Diffusers
Diffusion Single File
English
Chinese
i2v
video generation
comfyui
distillation
LoRA
quantization
nvfp4
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
Update README.md
Browse files
README.md
CHANGED
|
@@ -63,20 +63,28 @@ $ convert_to_quant -i "${1}" \
|
|
| 63 |
A rank-64 LoRA is also generated that can be used to minimise the effects of the resulting quantization.
|
| 64 |
|
| 65 |
The table below details the quantization format applied per layer type across block ranges:
|
| 66 |
-
| Layer |
|
| 67 |
-
|----
|
| 68 |
-
|
|
| 69 |
-
|
|
| 70 |
-
|
|
| 71 |
-
|
|
| 72 |
-
| cross_attn.
|
| 73 |
-
| cross_attn.
|
| 74 |
-
|
|
| 75 |
-
|
|
| 76 |
-
|
|
| 77 |
-
|
|
| 78 |
-
|
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
## Inference
|
| 82 |
The model can be used in ComfyUI with the following parameters, based on the distilled model's own recommendations:
|
|
|
|
| 63 |
A rank-64 LoRA is also generated that can be used to minimise the effects of the resulting quantization.
|
| 64 |
|
| 65 |
The table below details the quantization format applied per layer type across block ranges:
|
| 66 |
+
| **Layer** | **BF16** | **MXFP8** | **NVFP4** |
|
| 67 |
+
|:----:|:-------:|:--------:|:--------:|
|
| 68 |
+
| `cross_attn.k` | 3.3% | 15.2% | 81.5% |
|
| 69 |
+
| `cross_attn.k_img` | β | β | **100%** |
|
| 70 |
+
| `cross_attn.o` | 9.2% | 4.6% | 86.2% |
|
| 71 |
+
| `cross_attn.q` | 1.0% | 2.0% | 96.9% |
|
| 72 |
+
| `cross_attn.v` | β | 8.2% | 91.8% |
|
| 73 |
+
| `cross_attn.v_img` | β | 8.2% | 91.8% |
|
| 74 |
+
| `ffn.0` | β | 16.7% | 83.3% |
|
| 75 |
+
| `ffn.2` | β | β | **100%** |
|
| 76 |
+
| `self_attn.k` | 4.4% | 15.5% | 80.1% |
|
| 77 |
+
| `self_attn.o` | β | β | **100%** |
|
| 78 |
+
| `self_attn.q` | 3.2% | 2.1% | 94.7% |
|
| 79 |
+
| `self_attn.v` | β | β | **100%** |
|
| 80 |
+
| *(block biases)* | **100%** | β | β |
|
| 81 |
+
| `cross_attn.norm_k` | **100%** | β | β |
|
| 82 |
+
| `cross_attn.norm_k_img` | **100%** | β | β |
|
| 83 |
+
| `cross_attn.norm_q` | **100%** | β | β |
|
| 84 |
+
| `norm3` | **100%** | β | β |
|
| 85 |
+
| `self_attn.norm_k` | **100%** | β | β |
|
| 86 |
+
| `self_attn.norm_q` | **100%** | β | β |
|
| 87 |
+
| **Total** | **13.6%** | **5.2%** | **81.2%** |
|
| 88 |
|
| 89 |
## Inference
|
| 90 |
The model can be used in ComfyUI with the following parameters, based on the distilled model's own recommendations:
|