Text-to-Image
Diffusion Single File
qwen-image
qwen-image-2.1
nvfp4
comfyui
quantized
image-editing
rtx-5090
Instructions to use BennyDaBall/Qwen-Image-2.1-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusion Single File
How to use BennyDaBall/Qwen-Image-2.1-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
|
Download runtime/README.md from BennyDaBall/Qwen-Image-2.1-NVFP4: direct link, hf CLI and curl.
- Browser
- Download file 1.95 kB
-
https://huggingface.co/BennyDaBall/Qwen-Image-2.1-NVFP4/resolve/1a38d44a3a2f35cb0b543a25b04da0a963e7b5e6/runtime/README.md
- Command line
-
hf download hf://BennyDaBall/Qwen-Image-2.1-NVFP4@1a38d44a3a2f35cb0b543a25b04da0a963e7b5e6/runtime/README.md
-
curl -L -o README.md https://huggingface.co/BennyDaBall/Qwen-Image-2.1-NVFP4/resolve/1a38d44a3a2f35cb0b543a25b04da0a963e7b5e6/runtime/README.md
1.95 kB
| # Native NVFP4 text conditioning | |
| The checkpoints load with existing ComfyUI nodes. On the tested ComfyUI revision, | |
| normal text conditioning runs in FP32 and dequantizes the encoder weights. The | |
| image transformer already uses native NVFP4 compute. | |
| `qwen21-nvfp4-conditioning.patch` enables native NVFP4 matrix multiplication for | |
| Qwen Image 2.1 conditioning. It detects NVFP4 checkpoint metadata, converts the | |
| completed multimodal embeddings to BF16 on supported GPUs, and uses ComfyUI's | |
| existing quantized-matmul context. The context restores the previous operation | |
| settings after encoding. Vision preprocessing and the unnormalized final hidden | |
| state contract are preserved. BF16 and INT8 checkpoints keep the original path. | |
| Tested base: `99073836d45f66053c45ba8564984e6def9cebba`. | |
| No custom nodes, monkey-patching node pack, or additional runtime dependencies. | |
| Stop ComfyUI. From its Git checkout, apply the supplied patch: | |
| ```powershell | |
| git apply --check C:/path/to/Qwen-Image-2.1-NVFP4/runtime/qwen21-nvfp4-conditioning.patch | |
| git apply C:/path/to/Qwen-Image-2.1-NVFP4/runtime/qwen21-nvfp4-conditioning.patch | |
| ``` | |
| Restart ComfyUI. If the check fails, inspect the installed version and local | |
| changes; do not force the patch onto a different implementation. An upstream | |
| version may already provide equivalent support. To undo this exact patch, stop | |
| ComfyUI and use `git apply -R` with the same patch file. | |
| The same workflows also run without the patch, using native NVFP4 denoising and | |
| weight-only encoder quantization with FP32 conditioning. That mode is slower for | |
| uncached encoding and can produce a different image. All advertised accelerated | |
| results use the patch. | |
| Validation used an RTX 5090, CUDA 13.0 PyTorch, and comfy-kitchen 0.2.35. | |
| Other GPUs and CPU execution were not benchmarked. This is an independent patch, | |
| not an upstream ComfyUI release. The patch is subject to ComfyUI's GPL-3.0 license. | |