Instructions to use ixim/Image21-Turbo-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ixim/Image21-Turbo-INT8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ixim/Image21-Turbo-INT8", 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
Image21-Turbo-INT8
Built with Qwen
Independent community INT8 conversion of Qwen-Image-2.1-Turbo. Both the diffusion transformer and text encoder use bitsandbytes LLM.int8 (threshold 6.0); sensitive projections, the vision tower and VAE remain in floating point. This is a complete Diffusers pipeline.
The official eight-step sample_sigmas grid is preserved in model_index.json; CFG=1 and prefix KV caching are used. Changing num_inference_steps alone does not override the saved grid. This release requires the fixed Diffusers version below with PR #14950.
Companion application: IMGEN
Application source: iXimNet/IMGEN. IMGEN is a local visual studio for Qwen-Image-2.1 with a browser interface for text-to-image generation, editing with up to 10 reference images, prompt presets, and searchable history with saved parameters.
Choose Hugging Face or ModelScope and select Image21-Turbo-INT8 in IMGEN to use this model with its official eight-step sampling schedule and CFG=1. This INT8 model requires NVIDIA CUDA. See the IMGEN README for installation and usage; the application code is MIT-licensed, while these model weights remain under the Qwen Research License.
Usage
pip install -r requirements.txt
import torch
from scripts.runtime import load_int8_pipeline
pipe = load_int8_pipeline("ixim/Image21-Turbo-INT8")
image = pipe(
prompt="A ginger cat sitting by a sunlit window, natural photography.",
width=1024, height=1024, true_cfg_scale=1.0, use_kv_cache=True,
generator=torch.Generator("cpu").manual_seed(42),
).images[0]
image.save("cat.png")
Clone/download this repository first to use its scripts.runtime loader. On ModelScope, download with snapshot_download and pass its local path. The supplied loader loads quantized components sequentially and moves INT8 auxiliary tensors during CPU offload.
The loader also releases completed denoising prefix KV tensors before VAE decode. The eight-step denoising computation and untiled VAE are preserved; this reduces the native-resolution decode peak.
For editing, pass image=Image.open("input.png").convert("RGBA") with a new independent editing seed. Output PNG retains RGBA. VAE tiling is disabled in this evaluation.
Shared evaluation inputs: BF16 portrait · Official boat sketch
Informal BF16 / saved-INT8 evaluation
This small community evaluation is for reference and does not represent an official evaluation. Every result is included. One portrait warmup per precision/suite is excluded; editing has no separate warmup. Loading and disk writing are excluded from call latency. Suite means include generation and editing. CUDA allocated peaks exclude other processes and are not minimum VRAM requirements. Pixel drift is not a semantic quality score.
1024px core suite
9 cases / 18 pairs; 1024 × 1024; 8 steps; CFG 1; KV cache; model CPU offload; NVIDIA GeForce RTX 5090.
| Metric | BF16 | INT8 |
|---|---|---|
| Weights (GB) | 32.440 | 18.527 |
| Mean call (s) | 11.473 | 8.240 |
| Peak CUDA allocated (GiB) | 19.086 | 12.623 |
Runtime package versions:
| 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 |
| Python / CUDA | 3.13.5 / 12.8 |
Every preview below links to its unchanged full-resolution original PNG.
portrait · seed 42
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.
13.699s / 8.142s; allocated peak 16.402 / 10.020 GiB.
portrait · seed 123
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.
11.118s / 7.723s; allocated peak 16.402 / 10.020 GiB.
english_text · seed 42
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.
10.877s / 7.872s; allocated peak 16.409 / 10.029 GiB.
english_text · seed 123
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.
10.804s / 7.839s; allocated peak 16.409 / 10.029 GiB.
chinese_text · seed 42
设计一张现代咖啡馆海报,米白背景,中央一杯拉花拿铁。顶部准确写上中文大标题“慢下来,喝杯咖啡”,下方准确写上“小店今日营业”。文字清晰,留白充分,暖色摄影,不添加其他文字。
11.055s / 7.786s; allocated peak 16.413 / 10.025 GiB.
chinese_text · seed 123
设计一张现代咖啡馆海报,米白背景,中央一杯拉花拿铁。顶部准确写上中文大标题“慢下来,喝杯咖啡”,下方准确写上“小店今日营业”。文字清晰,留白充分,暖色摄影,不添加其他文字。
10.948s / 7.881s; allocated peak 16.413 / 10.025 GiB.
composition · seed 42
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.
10.675s / 7.867s; allocated peak 16.412 / 10.025 GiB.
composition · seed 123
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.
10.658s / 7.866s; allocated peak 16.412 / 10.025 GiB.
texture · seed 42
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.
10.907s / 7.801s; allocated peak 16.398 / 10.017 GiB.
texture · seed 123
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.
10.658s / 7.783s; allocated peak 16.398 / 10.017 GiB.
rgba · seed 42
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.
10.802s / 7.930s; allocated peak 16.396 / 10.007 GiB.
rgba · seed 123
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.
11.035s / 7.939s; allocated peak 16.396 / 10.007 GiB.
edit · seed 1000042
Change only the blue sweater to a red sweater. Preserve the same person, face, pose, lighting and background.
12.793s / 9.722s; allocated peak 19.081 / 12.620 GiB.
edit · seed 1000123
Change only the blue sweater to a red sweater. Preserve the same person, face, pose, lighting and background.
12.805s / 9.583s; allocated peak 19.081 / 12.620 GiB.
young_chinese_woman · seed 42
一张写实摄影风格的中国年轻成年女性肖像,人物明确为25岁成年人。黑色及肩直发,穿着米白色圆领针织衫,胸部以上构图,正面看向镜头,神情自然放松,轻微微笑。窗边柔和的自然日光,浅灰色简洁背景,真实自然的皮肤纹理和少量雀斑,淡妆,不过度磨皮。85mm人像摄影,浅景深,色彩自然,画面中没有文字。
10.914s / 7.914s; allocated peak 16.445 / 10.060 GiB.
young_chinese_woman · seed 123
一张写实摄影风格的中国年轻成年女性肖像,人物明确为25岁成年人。黑色及肩直发,穿着米白色圆领针织衫,胸部以上构图,正面看向镜头,神情自然放松,轻微微笑。窗边柔和的自然日光,浅灰色简洁背景,真实自然的皮肤纹理和少量雀斑,淡妆,不过度磨皮。85mm人像摄影,浅景深,色彩自然,画面中没有文字。
10.918s / 7.739s; allocated peak 16.445 / 10.060 GiB.
edit_boat · seed 20261009
Turn this yacht sketch into a photorealistic side-view photograph of the same vessel sailing on calm blue sea. Preserve the hull, deckhouses, windows, mast, funnel and lifeboat arrangement. Black hull, white superstructures, yellow funnel. Soft natural daylight, clear sky, the entire vessel in frame.
12.931s / 9.463s; allocated peak 19.086 / 12.623 GiB.
edit_boat · seed 20261010
Turn this yacht sketch into a photorealistic side-view photograph of the same vessel sailing on calm blue sea. Preserve the hull, deckhouses, windows, mast, funnel and lifeboat arrangement. Black hull, white superstructures, yellow funnel. Soft natural daylight, clear sky, the entire vessel in frame.
12.915s / 9.476s; allocated peak 19.086 / 12.623 GiB.
2048px native-resolution supplement
2 cases / 4 pairs; 2048 × 2048; 8 steps; CFG 1; KV cache; model CPU offload; NVIDIA GeForce RTX 5090.
| Metric | BF16 | INT8 |
|---|---|---|
| Weights (GB) | 32.440 | 18.527 |
| Mean call (s) | 61.430 | 43.795 |
| Peak CUDA allocated (GiB) | 26.926 | 26.925 |
portrait · seed 42
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.
45.849s / 33.398s; allocated peak 26.885 / 26.887 GiB.
portrait · seed 123
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.
46.312s / 32.985s; allocated peak 26.885 / 26.890 GiB.
edit_boat · seed 20261009
Turn this yacht sketch into a photorealistic side-view photograph of the same vessel sailing on calm blue sea. Preserve the hull, deckhouses, windows, mast, funnel and lifeboat arrangement. Black hull, white superstructures, yellow funnel. Soft natural daylight, clear sky, the entire vessel in frame.
87.835s / 52.009s; allocated peak 26.926 / 26.925 GiB.
edit_boat · seed 20261010
Turn this yacht sketch into a photorealistic side-view photograph of the same vessel sailing on calm blue sea. Preserve the hull, deckhouses, windows, mast, funnel and lifeboat arrangement. Black hull, white superstructures, yellow funnel. Soft natural daylight, clear sky, the entire vessel in frame.
65.723s / 56.786s; allocated peak 26.926 / 26.925 GiB.
Visual observations and limits
These are manual observations of the supplied samples, not a blind study, OCR benchmark, or an official quality rating. Each prompt has only two seeds; pixel error cannot establish semantic quality or general editing reliability.
以下是对随附样图的人工观察,不是盲测、OCR 基准或官方质量评价。每个提示词只有两个种子;像素误差不能证明语义质量或普遍改图可靠性。
- Portraits / 肖像: The 1024px elderly and adult portraits retain their broad composition, soft lighting, and realistic skin. Eyes, hair, expression, and fine texture drift. The inspected 2048px elderly portraits also retain the broad composition and blue sweater, with smaller visible changes to facial and hair detail. 1024px 老年及成年肖像整体构图、柔和光线和写实皮肤仍在,但眼睛、头发、表情及细节发生漂移;2048px 老年肖像整体构图与蓝色毛衣接近,面部和发丝仍有细微差异。
- English text / 英文文字: The requested headline and subtitle remain readable in both precisions in these samples. Typeface and layout can change, notably the seed-42 serif/sans-serif difference. 两种精度下这些样例的指定标题和副标题均可读,但字体与排版会变化,种子 42 的衬线/无衬线差异明显。
- Chinese text / 中文文字: The requested headline and subtitle are readable in the inspected samples. Cup material, shape, saucer, and placement vary; successful text does not imply identical poster content. 所检样例的指定中文标题和副标题可读;杯子材质、形状、杯碟及位置会变化,文字成功不代表海报内容一致。
- Spatial counting / 数量与位置: Both seeds retain three cups in red–blue–yellow order and a green apple in front of the middle cup. Shadows and cup geometry differ. 两个种子均保留红、蓝、黄三杯的顺序,以及中间杯前方的绿苹果;阴影和杯形有差异。
- Fine texture / 精细纹理: The kingfisher subject, natural lighting, and feather detail remain recognizable, with changes to feathers, head/wing shape, and the perch. 翠鸟主题、自然光与羽毛细节仍可辨认,羽毛、头部/翅膀形状和栖木会变化。
- Transparency / 透明通道: Both dragon-sticker seeds have real varying alpha, including transparent pixels (range 0–255), in both precisions. Outline, ears, wings, and pose differ. 两种精度、两个龙贴纸种子均具有真实变化的 alpha(范围 0–255,包含透明像素);轮廓、耳朵、翅膀及姿态有差异。Original RGBA PNGs are provided without flattening. 提供未合并背景的原始 RGBA PNG。
- Sweater editing / 毛衣改色: Both independent editing seeds turn the shared BF16 source's blue sweater red. The person, window, pose, and soft lighting are broadly retained, while facial detail changes. 两个独立编辑种子均把共用 BF16 输入的蓝毛衣改为红色;人物、窗户、姿态和柔和光线整体保留,面部细节仍有变化。
- 1024px boat editing / 船只改图: Both precisions produce photographic side views with sea and a yellow funnel. Windows, portholes, railings, and hull details drift. Seed 20261010 produces a largely white hull in both precisions, contrary to the requested black hull. 两种精度都生成了海面上的写实侧视船只及黄色烟囱,但窗户、舷窗、栏杆和船身细节会漂移;种子 20261010 两种精度都生成大面积白色船身,未完全遵循黑色船身要求。Exact preservation of the sketch's geometry is not established. 这些结果不能证明精确保留了草图几何结构。
- 2048px boat editing / 原生分辨率船只改图: The paired side views retain the broad deckhouse, mast, funnel, and lifeboat arrangement, with changes to windows, portholes, railings, and water texture. Seed 20261009 retains a white upper hull with a black lower strip in both precisions; seed 20261010 has a predominantly black hull. Color and exact geometry adherence are therefore still seed-dependent. 两种精度的侧视图整体保留舱室、桅杆、烟囱与救生艇布局,但窗户、舷窗、栏杆及水面纹理会变化。种子 20261009 两种精度都是白色上部船身加黑色底边;种子 20261010 则主要为黑色船身。颜色及精确几何保留仍依赖种子,不能由这两组样图推导普遍可靠性。
The first native INT8 run failed on its final boat-edit VAE decode with CUDNN_STATUS_INTERNAL_ERROR_HOST_ALLOCATION_FAILED. The supplied runtime now releases exhausted prefix KV tensors immediately before decode, while retaining them throughout denoising. Both precisions were rerun in fresh processes with the same fix; all 44 final PNGs completed. All 43 previously successful PNGs remain byte-identical. The paired measurements and logical released tensor sizes are recorded in cache-release-validation.json. Earlier diagnostic images and failure logs are retained in the author's local workspace.
首次原生分辨率 INT8 测试的最后一张船只改图在 VAE 解码时发生 CUDNN_STATUS_INTERNAL_ERROR_HOST_ALLOCATION_FAILED。配套运行时现于解码前释放已用完的前缀 KV 张量,去噪阶段始终保留缓存;两种精度已使用相同修正、独立新进程完整重跑,44 张最终 PNG 全部完成。此前成功生成的 43 张 PNG 均逐字节一致;对应记录和释放的逻辑张量大小见 cache-release-validation.json。早期诊断图与失败日志保留在作者本地工作区。
At 2048px without VAE tiling, both precisions still peak near 26.93 GiB CUDA allocated in this setup. INT8 does not quantize the VAE or guarantee proportionate memory savings at every resolution. The eight-step schedule and full-resolution decoder are unchanged. 2048px、不启用 VAE 分块时,本环境下两种精度的 CUDA 已分配峰值仍约为 26.93 GiB。INT8 没有量化 VAE,也不保证每个分辨率都获得相同比例的显存节省;官方 8 步采样和原尺寸解码保持不变。
Reproducibility and license
Official base: Qwen/Qwen-Image-2.1-Turbo,d65dbc9a7e8f6b5479e33dee6030eaab2a906509.
Diffusers: da1d3829cf08d4f329b526d89e17cc035c049d8d. Exact package versions, actual scheduler sigmas, source and image hashes, warmup settings and independent-process exits are included in evaluation/.
Reproduction instructions · Raw comparison · Native supplement · Conversion · Manifest
Non-commercial research and evaluation only under the accompanying Qwen Research License. See Notice and modifications. No fine-tuning or trained adapters are included.
- Downloads last month
- 1











































