HangGlidersRule/Darkstar-Qwen-Image-2.1-Base-ModelOpt-W4A4-NVFP4
Darkstar-Qwen-Image-2.1-Base-ModelOpt-W4A4-NVFP4
Non-commercial research artifact. NVIDIA ModelOpt NVFP4 (W4A4) quantization of `Qwen/Qwen-Image-2.1`, built by the Model Forge pipeline from the pinned upstream BF16 — no third-party quantized checkpoints were used as build inputs.
Published revision: 16f1b7fd748aa07e4f19c532991b0defe047dce0
License — Qwen Research License Agreement (read this first)
This is a derivative of Qwen-Image-2.1 and inherits the Qwen Research License Agreement (September 20, 2026). The full agreement text is shipped in this repository as `LICENSE`.
Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) 2026 Hangzhou Tongyi Laboratory Technology Co., Ltd. All Rights Reserved.
Commercial use requires a separate license from the Qwen team (model-business@notice.qwencloud.com).
Summary
NVFP4 (W4A4, group-16) quantization of the 7B single-stream DiT (QwenImage21Transformer2DModel, 32 blocks) with the Qwen3-VL 8B text encoder and VAE kept in BF16. The model does text-to-image generation and image-conditioned editing in one pipeline, with native RGBA output support.
Precision map
Provenance
- Upstream model:
Qwen/Qwen-Image-2.1 - Upstream revision:
b3179ad355be050328e483a9dfdd9e60cd62adfa - Weight edit: ModelOpt NVFP4 W4A4 quantization (own pipeline; calibration = Gustavosta Stable-Diffusion-Prompts, max algo)
- Toolchain:
nvidia-modelopt0.46.0rc2 @43fd41a…+diffusersmain @80c7ed26…(bridge-fork overlay registering the 2.1 ModelType; sha-pinned) - Recipe:
darkstar-qwen-image-2-1-base-nvfp4.yaml(in the engineering repository) - Engineering repository: `HangGlidersRule/model-forge`
Serving (vLLM-Omni — validated)
docker run --gpus all -p 8000:8000 \
-e NCCL_CUMEM_ENABLE=0 \
-v <hf-cache>:/root/.cache/huggingface \
vllm/vllm-omni:qwen-image21 \
bash -c 'vllm serve HangGlidersRule/Darkstar-Qwen-Image-2.1-Base-ModelOpt-W4A4-NVFP4 --omni --port 8000'OpenAI-compatible endpoints: POST /v1/images/generations, POST /v1/images/edits. Seed determinism is byte-identical for repeated same-seed requests (max_num_seqs=1 profile).
Note: the checkpoint config carries component-prefixed ignore patterns (*transformer_blocks.N.*). The vLLM-Omni runtime matches quantization exclusions against component-prefixed module names; unprefixed patterns silently fail to exclude (known upstream issue, documented by Model Forge).
Consumption without a server (diffusers / ComfyUI-style)
diffusers from_pretrained on this repo will attempt to parse the ModelOpt quantization config and fails on the current diffusers main schema (known upstream gap — diffusers' ModelOpt quantizer expects a different config shape and does not support NVFP4). Working consumption paths:
- vLLM-Omni (above) — the validated serving path.
- Dequant-on-load (documented reference implementation in the Model Forge repo): strip
quantization_configfrom a local copy'stransformer/config.json, load the pipeline, then dequantize the packed NVFP4 tensors (e2m1 nibble LUT × per-16-block fp8 scale × globalweight_scale_2) into the BF16 model. Validated end-to-end below. - ComfyUI native NVFP4 loader (PR #11635+) — expected to consume this format natively on Blackwell.
Evaluation (frozen protocol)
Quality manifest image-eval-v1 (sha 09daf654e4015a49d1f54961687d4f6df41da9910e4c0c25d1981582190aeee9), 25 frozen cases, full-denominator scoring (blanks/errors count as failures):
- Typography spot-check: legible text preserved (no quantization degradation visible).
- Dequant verification vs upstream BF16 weights: max err 0.083, correlation 0.996.
- Quant validators: 196 quantized modules, 0 misclassified vs policy, 0 degenerate scales.
- Performance: 4.78 s/img dequant-on-load (parity with BF16 control's 4.73; native fp4 kernels are the serving speedup path). RTX PRO 6000 Blackwell, 20 steps, 1024².
Family context
The Darkstar Qwen-Image-2.1 family ships a four-cell matrix plus FP8 variants (Base BF16 control profile, this NVFP4 cell, Base FP8, and Ablit cells pending the DiT-side behavior-transform research — tracked in the Model Forge private ledger). Ablit cells are not part of this release.
Non-commercial. Research and evaluation use only. Built with Qwen.
