--- license: other license_name: qwen-research license_link: LICENSE base_model: Qwen/Qwen-Image-2.1 base_model_relation: quantized library_name: diffusers pipeline_tag: text-to-image language: - en - zh tags: - diffusers - bitsandbytes - int8 - image-generation - image-editing - rgba --- # Image21-INT8 **Built with Qwen.** An independent bitsandbytes INT8 derivative of [Qwen-Image-2.1](https://huggingface.co/Qwen/Qwen-Image-2.1), prepared by **ixim**. This is a community conversion, not an official Qwen release. ## Editing evaluation revision — 2026-09-24 **Weights are unchanged.** This update corrects the editing evaluation protocol and inference defaults. Historical images, measurements and measured scripts remain available for reproduction. The old seed-42 edits reused the source-generation seed. When the RNG stream and latent shape also match, this can replay the source noise and confound editing quality. See the corrected discussion in [Diffusers #14824](https://github.com/huggingface/diffusers/issues/14824). Changing seed alone did **not** remove the artifacts in our 2048px tiled controls; the previous general 2048px recommendation is withdrawn. **The short vertical stains were isolated to tiled VAE decoding in the audited 2048px example.** Decoding the exact same saved latent with the same VAE checkpoint without tiling removes the visible stains; FP32 decoding with tiling retains them. This does not repair the missing branch or coarse bird detail already present in that failed edit. The quality suite therefore disables tiling. The revised suite uses five cases × two independent editing seeds (1000042 / 1000123), paired BF16 and INT8, 1024px area scale, 40 steps, CFG=1, KV cache, model CPU offload and untiled VAE. It adds actual transparent-background removal and an unchanged-image control. The complete matrix, raw RGBA files, alpha maps, white/black/checker composites, hashes, schedules and decoder latents are in [evaluation/editing-v2](evaluation/editing-v2). Inspect the [visual audit](evaluation/editing-v2/AUDIT.md) and download [comparison.html](evaluation/editing-v2/comparison.html) with its image folders for local viewing. No filtering, sharpening or alpha cleanup was applied. These are informal samples, not an official benchmark or a guarantee that all artifacts are resolved. Latent capture was enabled for diagnosis, so this revision makes no latency/speedup claim. In the revised samples, snowy-background replacement retains the bird and branch, and background removal produces real transparency. Preservation is still imperfect: in the unchanged-image control, seed 1000123 changes the green apple to yellow in both precisions. This failed control is retained. Start editing with a seed independent of the source: ```bash python -m scripts.infer --model . --input input.png --source-seed 42 --seed 1000042 --resolution 1024 --prompt "Change only the blue sweater to red. Preserve the person, lighting and background." --output edit.png ``` Omit `--source-seed` if unknown. Explicit seeds are never silently remapped; a known collision is rejected. Omitting width/height preserves the last input's aspect ratio. `--resolution` controls reference image area, while an explicit `--width` / `--height` pair controls output dimensions. VAE tiling remains an optional memory tradeoff, not a quality improvement guarantee. The sections below retain the historical v1 evaluation; their image-generation timings are not pooled with this revised editing suite. ### All revised evaluation samples | Case / seed | Input | BF16 | INT8 | |---|---|---|---| | portrait_recolor / 1000042 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/portrait_recolor.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/portrait_recolor.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/portrait_recolor-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/portrait_recolor-s1000042.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/portrait_recolor-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/portrait_recolor-s1000042.png) | | portrait_recolor / 1000123 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/portrait_recolor.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/portrait_recolor.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/portrait_recolor-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/portrait_recolor-s1000123.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/portrait_recolor-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/portrait_recolor-s1000123.png) | | cup_material / 1000042 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_material-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_material-s1000042.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_material-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_material-s1000042.png) | | cup_material / 1000123 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_material-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_material-s1000123.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_material-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_material-s1000123.png) | | bird_background / 1000042 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_background-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_background-s1000042.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_background-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_background-s1000042.png) | | bird_background / 1000123 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_background-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_background-s1000123.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_background-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_background-s1000123.png) | | bird_remove_background / 1000042 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_remove_background-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_remove_background-s1000042.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_remove_background-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_remove_background-s1000042.png) | | bird_remove_background / 1000123 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/bird_background.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_remove_background-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/bird_remove_background-s1000123.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_remove_background-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/bird_remove_background-s1000123.png) | | cup_identity / 1000042 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_identity-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_identity-s1000042.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_identity-s1000042.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_identity-s1000042.png) | | cup_identity / 1000123 | [![Input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/inputs/cup_material.png) | [![BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_identity-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/bf16/cup_identity-s1000123.png) | [![INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_identity-s1000123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing-v2/int8/cup_identity-s1000123.png) | ## Quantization Base revision: `b3179ad355be050328e483a9dfdd9e60cd62adfa`. Eligible linear layers in the generation transformer and the Qwen3-VL text encoder use **bitsandbytes LLM.int8**, with outlier threshold **6.0**. This is mixed-precision inference: outlier handling uses floating point; the VAE, normalization, embeddings, vision encoder, output head, and excluded conditioning/projection layers remain floating point. See the two component quantization JSON files for exact coverage. No fine-tuning or calibration dataset was used. This is not a pure W8A8 pipeline, FP8 conversion, or GGUF checkpoint. Lower storage does not imply faster inference. ## Installation and loading Use Python 3.13 and a CUDA-capable PyTorch installation. The tested runtime uses PyTorch 2.10.0+cu128 on an RTX 5090. Install the accompanying `requirements.txt`; it pins Diffusers to the official commit used for this conversion. ```bash pip install torch==2.10.0 torchvision==0.25.0 --index-url https://download.pytorch.org/whl/cu128 pip install -r requirements.txt ``` ```python import torch import sys from huggingface_hub import snapshot_download model_dir = snapshot_download("ixim/Image21-INT8") sys.path.insert(0, model_dir) # bundled, inspectable scripts/runtime.py from scripts.runtime import load_int8_pipeline pipe = load_int8_pipeline(model_dir, local_files_only=True) image = pipe( prompt='A neon sign reading "CREATE WITH LIGHT", rainy night', width=1024, height=1024, num_inference_steps=40, true_cfg_scale=1.0, use_kv_cache=True, generator=torch.Generator("cpu").manual_seed(42), ).images[0] image.save("output.png") ``` The saved quantization configuration is detected automatically. Do not re-quantize these weights at load time. For editing, start with the independent-seed 1024px recipe in EDITING_UPDATE.md. For transparency, use the upstream RGBA prompt format and save PNG files. Use the bundled loader on the pinned runtime: it loads/offloads the two INT8 components sequentially and moves their auxiliary tensors during model offload. Calling only `enable_model_cpu_offload()` leaves INT8 CUDA tensors resident in this tested stack. The helper does not change the checkpoint or quantization. ## Visual web app [IMGEN](https://github.com/iXimNet/IMGEN) is a separately maintained, open-source web app for image generation and editing with BF16, INT8, and INT4 model options. See its repository for setup instructions. ## Informal release evaluation **This community evaluation accompanies this model release and is provided for reference only. It does not represent any official evaluation by Qwen, Hugging Face, ModelScope, or their teams.** Results reflect a small, locally selected sample on one hardware/software configuration; they are not a standardized ranking or a guarantee of quality, speed, or memory requirements. 14 paired outputs across 7 cases at 1024×1024 on an RTX 5090. | Metric | BF16 | INT8 | |---|---:|---:| | Weight files (decimal GB) | 33.116 | 18.632 | | Mean call latency (s) | 26.44 | 20.21 | | Maximum CUDA allocated memory (GiB) | 19.08 | 12.09 | **Historical v1 observations (editing is confounded by seed reuse):** both precisions over-sharpen the 1024px sweater edit and alter its contrast; both add unwanted footer text to the inspected Chinese poster. The 2048px snowy-forest background replacement also fails in both precisions. These failures are retained below. Pixel differences measure drift, not semantic quality; no official score, blinded preference result, OCR, CLIP or FID score is claimed. Multi-reference editing at scale, other GPUs/attention backends and ComfyUI compatibility were not evaluated. ### All paired samples, prompts and observations Left: BF16; right: saved and reloaded INT8. Same prompt and seed within each pair. The main seven-case observations primarily inspect seed 42; both supplementary seeds were inspected. This is not a blinded preference study or an OCR/CLIP/FID score. #### Young Chinese adult woman portrait (supplement) Exact measured prompt: ```text 一张写实摄影风格的中国年轻成年女性肖像,人物明确为25岁成年人。黑色及肩直发,穿着米白色圆领针织衫,胸部以上构图,正面看向镜头,神情自然放松,轻微微笑。窗边柔和的自然日光,浅灰色简洁背景,真实自然的皮肤纹理和少量雀斑,淡妆,不过度磨皮。85mm人像摄影,浅景深,色彩自然,画面中没有文字。 ``` Both seeds retain the broad framing, clothing and window lighting. Expression, facial contours, skin texture and individual hair strands change. No obvious large facial distortion was seen in these four outputs; this is not an identity-preservation score. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Young Chinese adult woman portrait (supplement) · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/bf16/young_chinese_woman-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/bf16/young_chinese_woman-s42.png) | [![Young Chinese adult woman portrait (supplement) · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/int8/young_chinese_woman-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/int8/young_chinese_woman-s42.png) | SHA256 prefixes: BF16 `00716ad4721f` / INT8 `5ffeb0f35bf0`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Young Chinese adult woman portrait (supplement) · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/bf16/young_chinese_woman-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/bf16/young_chinese_woman-s123.png) | [![Young Chinese adult woman portrait (supplement) · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/int8/young_chinese_woman-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/young_woman/int8/young_chinese_woman-s123.png) | SHA256 prefixes: BF16 `a2f28b40c897` / INT8 `350e800c857e`. #### Older adult portrait Exact measured prompt: ```text A natural documentary portrait of an elderly woman with silver hair and freckles, wearing a blue wool sweater, standing beside a window in soft morning light. Realistic skin texture, gentle expression, waist-up composition. ``` Both depict the requested older woman, blue sweater and window. Face shape, wrinkles, framing and fabric details shift. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Older adult portrait · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/portrait-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/portrait-s42.png) | [![Older adult portrait · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/portrait-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/portrait-s42.png) | SHA256 prefixes: BF16 `01e37e178fb0` / INT8 `e37187a2530d`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Older adult portrait · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/portrait-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/portrait-s123.png) | [![Older adult portrait · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/portrait-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/portrait-s123.png) | SHA256 prefixes: BF16 `cff376e50c41` / INT8 `09391672b7aa`. #### English lettering Exact measured prompt: ```text A clean editorial poster with a deep blue background. Large exact headline at the top: "CREATE WITH LIGHT". Smaller exact subtitle: "September 2026". A realistic orange desk lamp occupies the lower half. Elegant balanced typography, no additional text. ``` Both inspected outputs visibly render CREATE WITH LIGHT and September 2026. Layout and desk objects differ. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![English lettering · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/english_text-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/english_text-s42.png) | [![English lettering · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/english_text-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/english_text-s42.png) | SHA256 prefixes: BF16 `ba31b0c8a312` / INT8 `98ea66acd842`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![English lettering · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/english_text-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/english_text-s123.png) | [![English lettering · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/english_text-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/english_text-s123.png) | SHA256 prefixes: BF16 `cf5e76dee9f0` / INT8 `b55551e7c179`. #### Chinese lettering Exact measured prompt: ```text 设计一张现代咖啡馆海报,米白背景,中央一杯拉花拿铁。顶部准确写上中文大标题“慢下来,喝杯咖啡”,下方准确写上“小店今日营业”。文字清晰,留白充分,暖色摄影,不添加其他文字。 ``` Both inspected outputs render the requested main title and subtitle, but also add unwanted, partly nonsensical footer text despite the no-extra-text instruction. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Chinese lettering · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/chinese_text-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/chinese_text-s42.png) | [![Chinese lettering · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/chinese_text-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/chinese_text-s42.png) | SHA256 prefixes: BF16 `7082cb71d997` / INT8 `dce2de1e3b8b`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Chinese lettering · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/chinese_text-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/chinese_text-s123.png) | [![Chinese lettering · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/chinese_text-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/chinese_text-s123.png) | SHA256 prefixes: BF16 `eae74256d7ed` / INT8 `7ff8508a9454`. #### Counting and spatial arrangement Exact measured prompt: ```text A studio photograph on a light gray tabletop: exactly three ceramic cups in a row, a red cup on the left, a blue cup in the middle, and a yellow cup on the right. A single green apple sits in front of the blue cup. Soft shadows, no text. ``` Both show three cups in red/blue/yellow order and one green apple in front of the blue cup. Object sizes and spacing differ. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Counting and spatial arrangement · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/composition-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/composition-s42.png) | [![Counting and spatial arrangement · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/composition-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/composition-s42.png) | SHA256 prefixes: BF16 `91e967685fbb` / INT8 `5704252c99e7`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Counting and spatial arrangement · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/composition-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/composition-s123.png) | [![Counting and spatial arrangement · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/composition-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/composition-s123.png) | SHA256 prefixes: BF16 `bc11612f260a` / INT8 `c030c007a9c3`. #### Feather and branch texture Exact measured prompt: ```text Macro photography of a small kingfisher perched on a mossy branch beside clear water, detailed blue feathers, droplets, natural sunlight, softly blurred forest background, realistic textures. ``` Both depict a plausible kingfisher; head angle, branch orientation and feather texture differ. Pixel drift alone does not establish worse semantic quality. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Feather and branch texture · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/texture-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/texture-s42.png) | [![Feather and branch texture · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/texture-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/texture-s42.png) | SHA256 prefixes: BF16 `40a0f73bb407` / INT8 `37042d165914`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Feather and branch texture · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/texture-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/texture-s123.png) | [![Feather and branch texture · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/texture-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/texture-s123.png) | SHA256 prefixes: BF16 `18c4403f388d` / INT8 `82fc88d5ab3c`. #### RGBA transparency Exact measured prompt: ```text This is an RGBA image with transparency. A cute cartoon dragon sticker, full body, green scales and small orange wings. The image has alpha channel and the background is transparent. ``` Both have a real varying alpha channel and a white sticker outline. Sampled background alpha is 0–1/255 and the subject is opaque. Page background colors are not part of the PNG; click through to inspect the original RGBA file. **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![RGBA transparency · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/rgba-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/rgba-s42.png) | [![RGBA transparency · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/rgba-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/rgba-s42.png) | SHA256 prefixes: BF16 `6f5dfea6ba02` / INT8 `8624d495fe40`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![RGBA transparency · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/rgba-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/rgba-s123.png) | [![RGBA transparency · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/rgba-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/rgba-s123.png) | SHA256 prefixes: BF16 `6f1abbb1a64a` / INT8 `4871aab8f9d4`. #### Image editing: sweater recoloring Exact measured prompt: ```text Change only the blue sweater to a red sweater. Preserve the same person, face, pose, lighting and background. ``` Both shift the sweater toward red/burgundy, but both also show conspicuous oversharpening and contrast/texture changes across the image. Faithful preservation of lighting and skin texture is not achieved. The cause is not identified or attributed specifically to INT8. Both variants use [this identical BF16 portrait input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/portrait-s42.png). **Seed 42** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Image editing: sweater recoloring · BF16 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/edit-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/edit-s42.png) | [![Image editing: sweater recoloring · INT8 · seed 42](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/edit-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/edit-s42.png) | SHA256 prefixes: BF16 `8713f6ef2ec0` / INT8 `79725e243ccf`. **Seed 123** | BF16 · Click to open original PNG | INT8 · Click to open original PNG | |---|---| | [![Image editing: sweater recoloring · BF16 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/edit-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/bf16/edit-s123.png) | [![Image editing: sweater recoloring · INT8 · seed 123](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/edit-s123.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/int8/edit-s123.png) | SHA256 prefixes: BF16 `7d00c5bb7a2b` / INT8 `d8023e34ba10`. ### Historical 2048px editing comparisons (v1; superseded recommendation) Four paired editing examples are shown with their shared input, generated by BF16 in this evaluation. Outputs use 2048×2048, 40 steps, seed 42, CFG=1, KV cache and model CPU offload. Both precisions enable default VAE tiling (256px minimum tiles, 192px strides). The 1024px input PNGs are resized inside the pipeline with output_resolution=2048. All images link to the full original PNG. The sweater example at 1024px changes the requested color but fails to preserve image texture. At 2048px with tiling, both precisions better preserve the soft light and skin texture. RGB input, KV-cache-off and 1024px tiling checks did not visibly resolve that failure; an untiled 2048px call was stopped during memory-constrained decoding and is excluded. These few checks do not establish a root cause or universal editing reliability. #### Older woman: blue sweater to red **Prompt:** Change only the blue sweater to a red sweater. Preserve the same person, face, pose, lighting and background. | Shared input | BF16 | INT8 | |---|---|---| | [![Older woman: blue sweater to red input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/audit/input.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/audit/input.png) | [![Older woman: blue sweater to red BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/audit/bf16-native-tiled/edit_native.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/audit/bf16-native-tiled/edit_native.png) | [![Older woman: blue sweater to red INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/audit/int8-native-tiled/edit_native.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/audit/int8-native-tiled/edit_native.png) | Both outputs make the sweater red and retain soft lighting and broadly natural skin texture. Fine facial and fabric details still shift, and faint colored marks are visible in both; this is not lossless preservation. #### Adult woman: cream sweater to navy blue **Prompt:** Change only the cream sweater to a navy blue sweater. Preserve the same woman, face, hairstyle, pose, lighting and background. | Shared input | BF16 | INT8 | |---|---|---| | [![Adult woman: cream sweater to navy blue input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/inputs/portrait_recolor.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/inputs/portrait_recolor.png) | [![Adult woman: cream sweater to navy blue BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/bf16/portrait_recolor-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/bf16/portrait_recolor-s42.png) | [![Adult woman: cream sweater to navy blue INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/int8/portrait_recolor-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/int8/portrait_recolor-s42.png) | Both outputs recolor the sweater to navy blue while broadly retaining the woman, pose, window light and background. Facial, hair and knitted-fabric details still shift slightly; this is not an identity-preservation score. #### Product edit: ceramic cup to brushed metal **Prompt:** Change only the middle blue ceramic cup into a brushed silver metal cup. Preserve its shape and position, the red and yellow cups, the green apple, the tabletop, lighting and background. | Shared input | BF16 | INT8 | |---|---|---| | [![Product edit: ceramic cup to brushed metal input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/inputs/cup_material.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/inputs/cup_material.png) | [![Product edit: ceramic cup to brushed metal BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/bf16/cup_material-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/bf16/cup_material-s42.png) | [![Product edit: ceramic cup to brushed metal INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/int8/cup_material-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/int8/cup_material-s42.png) | Both make the middle cup look like brushed silver metal while broadly preserving the arrangement of three cups and the apple. Cup rims, reflections and apple texture shift slightly; faint line artifacts are visible in the background. #### Background replacement: snowy forest (unsuccessful) **Prompt:** Replace only the blurred forest background with a softly blurred snowy winter forest. Preserve the same kingfisher, its colors and pose, the mossy branch, framing and foreground lighting. | Shared input | BF16 | INT8 | |---|---|---| | [![Background replacement: snowy forest (unsuccessful) input](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/inputs/bird_background.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/inputs/bird_background.png) | [![Background replacement: snowy forest (unsuccessful) BF16](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/bf16/bird_background-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/bf16/bird_background-s42.png) | [![Background replacement: snowy forest (unsuccessful) INT8](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/int8/bird_background-s42.png)](https://huggingface.co/ixim/Image21-INT8/resolve/main/evaluation/editing/int8/bird_background-s42.png) | Both fail the requested edit: the mossy branch disappears, the background becomes largely white instead of a snowy forest, and the bird loses photographic detail. This failure is present in both BF16 and INT8 and cannot be attributed to quantization alone. #### Editing measurements (three-case timed set) The clothing-color, cup-material and bird-background cases each have one timed call per precision after one full-settings warmup. The older-woman sweater example is a separate cold, instrumented call and is shown for visual comparison only; its latency is not pooled here. These timings must not be compared directly with the 1024px mean. | Case | BF16 s | INT8 s | BF16 allocated peak GiB | INT8 allocated peak GiB | |---|---:|---:|---:|---:| | portrait_recolor | 201.80 | 194.77 | 26.51 | 21.65 | | cup_material | 433.99 | 193.33 | 26.52 | 21.66 | | bird_background | 585.31 | 184.68 | 26.52 | 21.66 | Every measured output from the three declared cases is included above. Visual observations are subjective and are not identity, material-recognition or instruction-following scores. Raw records and reproduction: [BF16](evaluation/editing/bf16/records.jsonl), [INT8](evaluation/editing/int8/records.jsonl), [summary](evaluation/editing/summary.json), [process isolation](evaluation/editing/process-isolation.jsonl), [cases](benchmarks/editing.json), [measured case-file bytes](evaluation/editing/measured-cases.zip), [runner](scripts/benchmark_edits.py). Historical v1 reproduction only (seed reuse and tiling artifact risks); use the revised recipe above for current editing: ```python from PIL import Image pipe.vae.enable_tiling() image = pipe( prompt="Change only the blue sweater to a red sweater. Preserve the same person, face, pose, lighting and background.", image=Image.open("input.png"), width=2048, height=2048, output_resolution=2048, num_inference_steps=40, true_cfg_scale=1.0, use_kv_cache=True, generator=torch.Generator("cpu").manual_seed(42), ).images[0] image.save("edit.png") ``` ### Measurement methods and detailed metrics The 1024px main suite has seven cases and two seeds per case; the adult portrait set and 2048px editing set are reported separately. Each precision runs in a fresh process, with the preceding process exited before the next starts. Process IDs, GPU process listings, zero-allocation startup and per-image CUDA baselines are recorded. Both use the bundled CPU-offload helper. Paired calls use identical inputs, prompts, CPU random generators, seeds, dimensions, 40 steps, CFG=1 and KV cache. Timed suites exclude a full-settings warmup. BF16 runs before INT8; each case/seed has one timed call, with no confidence interval. Desktop background activity is not strictly controlled, so single-call timings are indicative only. Timing includes encoding, denoising, decoding and CPU transfers, but excludes model loading and file writing. Peak allocated/reserved memory is process-local PyTorch CUDA usage, not total board memory or a minimum GPU capacity. Only the RTX 5090 was tested. ### Supplementary portrait summary | Metric | BF16 | INT8 | |---|---:|---:| | Mean call latency (s) | 27.61 | 19.51 | | Maximum CUDA allocated (GiB) | 16.44 | 9.53 | ### Per-image timing and memory | Case | Seed | BF16 s | INT8 s | BF16 allocated GiB | INT8 allocated GiB | |---|---:|---:|---:|---:|---:| | Older adult portrait | 42 | 28.59 | 19.62 | 16.40 | 9.49 | | Older adult portrait | 123 | 26.07 | 19.48 | 16.40 | 9.49 | | English lettering | 42 | 25.42 | 19.54 | 16.41 | 9.50 | | English lettering | 123 | 25.66 | 19.68 | 16.41 | 9.50 | | Chinese lettering | 42 | 25.62 | 19.61 | 16.41 | 9.50 | | Chinese lettering | 123 | 25.46 | 19.61 | 16.41 | 9.50 | | Counting and spatial arrangement | 42 | 25.39 | 19.32 | 16.41 | 9.49 | | Counting and spatial arrangement | 123 | 25.48 | 19.15 | 16.41 | 9.49 | | Feather and branch texture | 42 | 25.32 | 19.42 | 16.40 | 9.49 | | Feather and branch texture | 123 | 25.18 | 19.16 | 16.40 | 9.49 | | RGBA transparency | 42 | 25.22 | 19.22 | 16.40 | 9.48 | | RGBA transparency | 123 | 25.54 | 19.22 | 16.40 | 9.48 | | Image editing: sweater recoloring | 42 | 30.79 | 25.07 | 19.08 | 12.09 | | Image editing: sweater recoloring | 123 | 30.46 | 24.81 | 19.08 | 12.09 | | Young Chinese adult woman portrait (supplement) | 42 | 28.58 | 19.58 | 16.44 | 9.53 | | Young Chinese adult woman portrait (supplement) | 123 | 26.63 | 19.44 | 16.44 | 9.53 | ### Pixel drift (not a semantic quality score) RGB MAE and PSNR use a white composite so invisible RGB values in transparent pixels do not dominate the comparison. Alpha MAE is measured separately. | Case | Seed | RGB MAE | RGB PSNR dB | Alpha MAE | |---|---:|---:|---:|---:| | Older adult portrait | 42 | 0.01341 | 31.70 | 0.000046 | | Older adult portrait | 123 | 0.01630 | 30.55 | 0.000180 | | English lettering | 42 | 0.02626 | 19.45 | 0.000008 | | English lettering | 123 | 0.01180 | 25.83 | 0.000010 | | Chinese lettering | 42 | 0.05972 | 15.60 | 0.000108 | | Chinese lettering | 123 | 0.02460 | 20.44 | 0.000068 | | Counting and spatial arrangement | 42 | 0.02268 | 23.67 | 0.000022 | | Counting and spatial arrangement | 123 | 0.01959 | 22.87 | 0.000035 | | Feather and branch texture | 42 | 0.06978 | 18.02 | 0.000191 | | Feather and branch texture | 123 | 0.01684 | 27.93 | 0.000059 | | RGBA transparency | 42 | 0.01829 | 20.89 | 0.011088 | | RGBA transparency | 123 | 0.04647 | 17.05 | 0.029543 | | Image editing: sweater recoloring | 42 | 0.00971 | 36.48 | 0.000111 | | Image editing: sweater recoloring | 123 | 0.00391 | 43.27 | 0.000026 | | Young Chinese adult woman portrait (supplement) | 42 | 0.01002 | 31.42 | 0.000121 | | Young Chinese adult woman portrait (supplement) | 123 | 0.00631 | 35.94 | 0.000093 | ### Additional memory telemetry Loading is measured separately: BF16 peaks at 0.00 GiB CUDA allocated (loaded to CPU), INT8 at 9.34 GiB with the bundled sequential loader. Neither value is a minimum supported GPU capacity. Reserved memory is the PyTorch CUDA allocator peak. CPU RSS is the process snapshot after inference, not a peak. | Case | Seed | BF16 reserved GiB | INT8 reserved GiB | BF16 RSS GiB | INT8 RSS GiB | |---|---:|---:|---:|---:|---:| | Older adult portrait | 42 | 16.58 | 9.60 | 39.60 | 21.22 | | Older adult portrait | 123 | 16.58 | 9.60 | 42.25 | 21.47 | | English lettering | 42 | 16.58 | 9.61 | 43.36 | 21.51 | | English lettering | 123 | 16.58 | 9.61 | 44.45 | 21.46 | | Chinese lettering | 42 | 16.59 | 9.60 | 45.35 | 21.52 | | Chinese lettering | 123 | 16.59 | 9.60 | 46.35 | 21.52 | | Counting and spatial arrangement | 42 | 16.59 | 9.60 | 46.49 | 21.56 | | Counting and spatial arrangement | 123 | 16.59 | 9.60 | 47.10 | 21.55 | | Feather and branch texture | 42 | 16.58 | 9.60 | 46.94 | 21.55 | | Feather and branch texture | 123 | 16.58 | 9.60 | 46.99 | 21.54 | | RGBA transparency | 42 | 16.58 | 9.55 | 46.95 | 21.54 | | RGBA transparency | 123 | 16.58 | 9.55 | 47.66 | 21.53 | | Image editing: sweater recoloring | 42 | 20.03 | 12.97 | 48.55 | 22.22 | | Image editing: sweater recoloring | 123 | 20.03 | 12.97 | 48.55 | 22.20 | | Young Chinese adult woman portrait (supplement) | 42 | 16.62 | 9.66 | 39.34 | 21.21 | | Young Chinese adult woman portrait (supplement) | 123 | 16.62 | 9.66 | 42.60 | 21.44 | ### Evaluation scope and runtime The main suite has 14 pairs; the separate portrait supplement has 2 pairs. All 16 pairs / 32 original PNG images from these suites are shown below. Supplementary measurements are kept separate from the main summary average. All previews link to their full-resolution original PNG. Click an image to open it; no crop, retouching or regenerated substitute is used. | Setting | Recorded value | |---|---| | GPU | NVIDIA GeForce RTX 5090 | | Driver / board memory | 616.92 / 32607 MiB | | System RAM | 255.5 GiB | | OS | Windows-11-10.0.26200-SP0 | | Python / CUDA | 3.13.5 / 12.8 | | Generation | 1024×1024; 40 steps; CFG 1.0; KV cache enabled | | RNG / seeds | CPU torch.Generator; 42, 123 | | Offload / attention | model CPU offload / default SDPA | | Warmup / order | One excluded full-settings warmup per precision per suite; BF16 then INT8 | | Package | Version | |---|---| | torch | 2.10.0+cu128 | | torchvision | 0.25.0+cu128 | | diffusers | 0.41.0.dev0 | | transformers | 5.17.0 | | accelerate | 1.15.0 | | bitsandbytes | 0.50.2 | | safetensors | 0.8.0 | | huggingface-hub | 1.32.0 | | tokenizers | 0.23.2 | | numpy | 2.2.6 | | pillow | 12.2.0 | | psutil | 7.0.0 | ### Machine-readable evidence The measured data and all images above are embedded in this card. Original files remain available for independent checking: - [Core CSV](evaluation/comparison.csv) · [Portrait CSV](evaluation/young_woman/comparison.csv) - [Core BF16 JSONL](evaluation/bf16/records.jsonl) · [Core INT8 JSONL](evaluation/int8/records.jsonl) - [Portrait BF16 JSONL](evaluation/young_woman/bf16/records.jsonl) · [Portrait INT8 JSONL](evaluation/young_woman/int8/records.jsonl) - [Core environment](evaluation/bf16/environment.json) · [INT8 environment](evaluation/int8/environment.json) - [File checksums](MANIFEST.json) · [Quantization provenance](conversion.json) ## License and modifications The weights remain subject to the [Qwen Research License Agreement](LICENSE): non-commercial research and evaluation only; commercial use requires a separate license from the original licensor. Redistribution must preserve that agreement, attribution and modification notices. See [Notice](Notice) and [CHANGES.md](CHANGES.md). Source: [Hugging Face](https://huggingface.co/Qwen/Qwen-Image-2.1) | [ModelScope](https://modelscope.cn/models/Qwen/Qwen-Image-2.1).