Repository navigation
Support Qwen-Image-2.1 Turbo prequantized INT8 on CUDA and ROCm - #1767
Merged
helloyongyang merged 7 commits intoNov 30, 2026
Merged
Conversation
q6y6y6
marked this pull request as ready for review
November 30, 2026 03:09
q6y6y6
force-pushed
the
codex/qwen21-prequantized-int8
branch
from
November 30, 2026 04:26
a4600bb to
17effb2
Compare
helloyongyang
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qwen-Image-2.1 can use the released Turbo INT8 transformer shards with
int8-tritonon CUDA andint8-rocmon ROCm. Both loaders retain INT8 weights and FP32 per-output-channel scales. ROCm also accepts the original BF16 input for online quantization. Includes single-GPU configuration examples.Windows validation
Verified checkpoint revision
b572c2d129f1f440c1643e1be730ac1336f2d5d5on both machines. Checked both shard hashes, all 224 INT8 weight/scale pairs, all three projection dimensions against INT32 references, malformed scales and ROCm online quantization. Both platforms generated two 512×512 images with the same prompt, seed 42 and eight Turbo steps. Each platform's two INT8 images matched pixel for pixel.Timings exclude model initialization. The first CUDA INT8 image request used a fresh Triton cache. The RTX BF16 baseline uses model-level offload (3.93 s for its second 512×512 request). The original resident DiT setup took 357.80 s and peaked at 29.08 GiB. Both phase-offloaded BF16 images matched the resident BF16 image pixel for pixel. At 1024×1024 the phase-offloaded BF16 profile took 15.60 s and 12.24 s for the first and second requests. RTX INT8 uses a resident DiT, so the RTX columns compare different memory strategies. On gfx1151, packing the INT8 weights once at load time reduced first/second request times from 118.78/115.61 seconds to 14.61/11.86 seconds. Both images matched their pre-optimization outputs pixel for pixel. These measurements cover one 512×512 prompt on each machine. Mean absolute RGB pixel differences versus each BF16 output were 2.63 and 9.00 on a 0–255 scale.
CUDA validation used matching CPython development files for the Windows Triton compiler. On gfx1151, the Windows application’s math SDPA setting was used for both precisions.
Local block offload and regression validation
On Radeon 8060S, ordinary block offload with the official prequantized checkpoint produced a 512×512 image pixel-identical to resident INT8 (8 steps, seed 42). CPU source blocks own the weights; the two accelerator slots reuse their storage. The local acceptance suite exercised two consecutive swaps, distinct per-token activation scales, and rank-local checkpoint loading for row/column TP on CPU. All six tests passed on ROCm; CUDA passed four applicable tests with two ROCm-only skips. TP coverage simulates two ranks and does not require a distributed job.