Instructions to use nvidia/Qwen-Image-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nvidia/Qwen-Image-NVFP4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/Qwen-Image-NVFP4", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
- Model Overview
- Description:
- Third-Party Community Consideration
- References
- Model Architecture:
- Input:
- Output:
- Software Integration:
- Model Version(s):
- Training, Testing, and Evaluation Datasets:
- Calibration Dataset:
- Training Dataset:
- Testing Dataset:
- Evaluation Dataset:
- Inference:
- Post Training Quantization
- Usage
- Evaluation
- Sample images
- Model Limitations:
- Ethical Considerations
- Description:
Model Overview
Description:
The NVIDIA Qwen-Image-NVFP4 model is the quantized version of Qwen's Qwen-Image model, which is a text-to-image diffusion transformer with strong image-generation quality, complex text rendering, and prompt adherence. For more information, please check here. The NVIDIA Qwen-Image-NVFP4 model is quantized with Model Optimizer.
This model is ready for commercial or non-commercial use.
Third-Party Community Consideration
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party's requirements for this application and use case; see link to Non-NVIDIA (Qwen-Image) Model Card.
References
- Nvidia Model Optimizer: https://github.com/NVIDIA/Model-Optimizer
- Qwen-Image model card
- Qwen-Image Technical Report
License/Terms of Use:
GOVERNING DOWNLOAD TERMS: Use of this model is governed by the NVIDIA Open Model Agreement.
Additional Information: Apache license 2.0
Deployment Geography:
Global
Use Case:
Developers and researchers looking to take off-the-shelf, pre-quantized text-to-image models for deployment in creative-content prototyping, visual-content generation workflows, and other AI-powered image-generation applications.
Release Date:
Hugging Face 10/12/2026 via https://huggingface.co/nvidia/Qwen-Image-NVFP4
Model Architecture:
Architecture Type: Diffusion Transformer (MMDiT)
Network Architecture: QwenImageTransformer2DModel in a QwenImagePipeline
This model was developed based on: Qwen/Qwen-Image
Number of Model Parameters: 20.43B parameters in the denoising transformer; 28.85B learned parameters in the full pipeline when the text encoder and VAE are included.
The full pipeline contains a Qwen2.5-VL text encoder, Qwen tokenizer, 60-layer Qwen-Image transformer, Qwen-Image VAE, and FlowMatch Euler scheduler. The quantized release preserves the base-model architecture while reducing inference precision for supported operators.
Input:
Input Type(s): Text
Input Format(s): String
Input Parameters: One-Dimensional (1D) sequence
Other Properties Related to Input: The pipeline allows at most 1,024 prompt tokens and defaults to 512. The upstream model card documents support for both English and Chinese prompt workflows.
Output:
Output Type(s): Image
Output Format: Red, Green, Blue (RGB)
Output Parameters: Two-Dimensional (2D)
Other Properties Related to Output: The pipeline returns generated images, typically as Python Imaging Library (PIL) images. Use width and height values divisible by 16 to avoid automatic resizing.
Our AI models are designed and/or optimized to run on NVIDIA GPU-accelerated systems. By leveraging NVIDIA's hardware (e.g. GPU cores) and software frameworks (e.g., CUDA libraries), the model achieves faster inference times compared to CPU-only solutions.
Software Integration:
Supported Runtime Engine(s):
- TensorRT-LLM VisualGen 1.3.0rc28
Supported Hardware Microarchitecture Compatibility:
- NVIDIA Blackwell - GB300
Preferred Operating System(s):
- Linux
The integration of foundation and fine-tuned models into AI systems requires additional testing using use-case-specific data to ensure safe and effective deployment. Following the V-model methodology, iterative testing and validation at both unit and system levels are essential to mitigate risks, meet technical and functional requirements, and ensure compliance with safety and ethical standards before deployment.
Model Version(s):
The model version is Qwen-Image-NVFP4 version 1.0 and is quantized with NVIDIA Model Optimizer v0.47.0.
Training, Testing, and Evaluation Datasets:
Calibration Dataset:
Link: Gustavosta/Stable-Diffusion-Prompts
Data Collection Method by dataset: Hybrid: Automated, Synthetic
Labeling Method by dataset: Automated
Properties: Only text prompts from the dataset were used for calibration of the quantized release.
Training Dataset:
Data Modality: Text, Image
Text Training Data Size: Undisclosed
Image Training Data Size: Undisclosed
Data Collection Method by dataset: Undisclosed
Labeling Method by dataset: Undisclosed
Properties: The upstream Qwen-Image model card describes the model's image-generation and editing capabilities, but does not provide enough detail in the retrieved source to fully characterize the original training datasets for this NVIDIA quantized release.
Testing Dataset:
Data Collection Method by dataset: Undisclosed
Labeling Method by dataset: Undisclosed
Properties: Undisclosed
Evaluation Dataset:
- Datasets: Qwen-Image-Bench, OneIG-EN
Data Collection Method by dataset: Hybrid: Automated, manually-collected
Labeling Method by dataset: Qwen-Image-Bench: Expert-reviewed benchmark metadata; automated scoring of this release using Q-Judger. OneIG-EN: Model-generated evaluation questions and reasoning references, alongside curated reference assets; automated scoring using the benchmark’s dimension-specific evaluators and metrics.
Properties: Qwen-Image-Bench: A text-to-image benchmark assessing quality, aesthetics, text-image alignment, real-world fidelity, and creative generation. OneIG-EN: The English subset of OneIG-Bench, assessing alignment, text rendering, knowledge/reasoning, style, and diversity.
Inference:
Acceleration Engine: TensorRT-LLM VisualGen
Test Hardware: NVIDIA Blackwell - GB300
Post Training Quantization
This checkpoint stores 784 transformer linear weight matrices in ModelOpt NVFP4 format across blocks 2–57, with 14 quantized matrices per block. Supported inference kernels use NVFP4 weights and activations for these linear operations. Other transformer parameters, the text encoder, and the VAE retain higher precision.
Usage
This checkpoint was validated with TensorRT-LLM VisualGen 1.3.0rc28 on an NVIDIA GB300 GPU. VisualGen loads the stored ModelOpt NVFP4 weights and quantization configuration directly; no weight conversion or runtime source patch is required.
1. Download the checkpoint
Download the complete repository, including the transformer, text encoder, tokenizer, VAE, and scheduler.
python3 -m pip install --upgrade huggingface_hub
hf download nvidia/Qwen-Image-NVFP4 \
--local-dir ./Qwen-Image-NVFP4
export MODEL_DIR="$(realpath ./Qwen-Image-NVFP4)"
2. Create the serving configuration
cat > visualgen-eager.yaml <<'YAML'
attention_config:
backend: VANILLA
parallel_config:
cfg_size: 1
ulysses_size: 1
torch_compile_config:
enable: false
cuda_graph_config:
enable: false
compilation_config:
skip_warmup: true
YAML
export VISUALGEN_CONFIG="$(realpath visualgen-eager.yaml)"
3. Start the server
docker run --rm \
--gpus '"device=0"' \
--ipc=host \
-p 127.0.0.1:8000:8000 \
-v "$MODEL_DIR:/model:ro" \
-v "$VISUALGEN_CONFIG:/visualgen-eager.yaml:ro" \
nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc28 \
trtllm-serve /model \
--host 0.0.0.0 \
--port 8000 \
--visual_gen_args /visualgen-eager.yaml
After the server finishes loading, check its health from another terminal:
curl --fail http://127.0.0.1:8000/health
4. Generate an image
import base64
import json
import urllib.request
from pathlib import Path
payload = {
"model": "/model",
"prompt": (
"A realistic photograph of a red ceramic teapot on a wooden "
"table beside a window, soft morning light, detailed wood grain."
),
"negative_prompt": " ",
"size": "512x512",
"num_inference_steps": 50,
"guidance_scale": 4.0,
"seed": 42,
"response_format": "b64_json",
"format": "png",
}
request = urllib.request.Request(
"http://127.0.0.1:8000/v1/images/generations",
data=json.dumps(payload).encode("utf-8"),
headers={"Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(request, timeout=600) as response:
result = json.load(response)
output = Path("qwen-image-nvfp4.png")
output.write_bytes(base64.b64decode(result["data"][0]["b64_json"]))
print(f"Saved {output.resolve()}")
Evaluation
The accuracy benchmark results are presented in the table below:
| Model | Qwen-Image-Bench | OneIG-EN |
|---|---|---|
| Baseline (BF16) | 48.986 | 51.337 |
| NVFP4 | 49.754 | 51.563 |
Baseline: Qwen/Qwen-Image, revision
75e0b4be. Qwen-Image-Bench: 1,000 prompts, seed 42. OneIG-EN: 1,119/1,120 prompts, seeds 42–45; one prompt excluded before generation. Both used 1024×1024, 50 steps, CFG 4.0, and a single-space negative prompt. OneIG is the equal arithmetic mean of alignment, text, reasoning, style, and diversity.
Sample images
Both BF16 baseline and NVFP4 counterpart use the same prompt, seed, resolution, 50 steps, CFG 4.0, and a single-space negative prompt.
Photo
Prompt: A realistic photograph of a red ceramic teapot on a wooden table beside a window, soft morning light, detailed wood grain.
Seed: 42; resolution: 512x512.
Chinese text
Prompt: 一家温暖的中国茶馆,门口招牌上清晰写着“春日茶馆”四个汉字,木质门窗,柔和的日光。
Seed: 44; resolution: 512x512.
Close-up portrait
Prompt: 佳能 EOS R5 全画幅人像镜头85mm f/1.2 拍摄风格:室内柔光环境下的肖像,模特穿浅色衬衫,背景完全虚化;眼神专注,瞳孔中高光清晰。要求:景深真实、皮肤细节自然、眼神对焦准确、无AI蜡像感。
Seed: 42; resolution: 1024x1024.
Model Limitations:
The base model may generate inaccurate, low-quality, or otherwise undesirable images, even when prompts are benign. Output quality can vary with prompt language, prompt complexity, and image resolution. The model may also inherit biases or content artifacts from the upstream model and its training data. This checkpoint is not intended for image-understanding tasks, safety-critical applications, or illegal or abusive content generation without additional safeguards and testing.
Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. Developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
Please report model quality, risk, security vulnerabilities or NVIDIA AI Concerns here.
- Downloads last month
- 2
Model tree for nvidia/Qwen-Image-NVFP4
Base model
Qwen/Qwen-Image




