Instructions to use DALabCommunity/Haidass-Image-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use DALabCommunity/Haidass-Image-Instruct with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("DALabCommunity/Haidass-Image-Base-v1_0.6B_512px", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("DALabCommunity/Haidass-Image-Instruct") 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
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("DALabCommunity/Haidass-Image-Base-v1_0.6B_512px", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("DALabCommunity/Haidass-Image-Instruct")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]
Haidass-Image-Instruct 0.1.0
English ยท ็ฎไฝไธญๆ ยท Technical details
Haidass-Image-Instruct 0.1.0 is a single integrated 0.6B text-to-image model at 512 ร 512, post-trained from Haidass-Image-Base-v1_0.6B_512px (checkpoint 60463) on Huawei Ascend 910B NPUs. It combines a flow-matching DiT backbone, a writing LoRA for English display text, and a counting head for object-count selection, paired with a frozen Qwen/Qwen3-0.6B text encoder. Default inference selects the appropriate route automatically from each prompt.
Quick start
Run from the downloaded model directory in Python 3.11+ (--device auto checks CUDA, Ascend NPU, then CPU; Qwen/Qwen3-0.6B downloads on first use; see DETAILS.md for the cases.json fields and full PowerShell commands):
requirements.txt installs the standard PyTorch build from PyPI (on Windows this is the CPU build). For an NVIDIA GPU, install the PyTorch build for your CUDA version first; on Ascend NPUs, install into an environment that already has torch_npu.
python -m pip install -r requirements.txt
python inference.py "A sunlit stone bridge over a calm mountain river" --device auto --seed 42 --output bridge.png
# Batch mode (Bash; for PowerShell see DETAILS.md): write a small cases.json, then run it and the route switches
cat > cases.json <<'EOF'
[{"id": "bridge", "caption": "A sunlit stone bridge over a calm mountain river", "seed": 42},
{"id": "sign", "caption": "A teal enamel sign reading \"OPEN LATE\" in a rainy shop window", "seed": 42},
{"id": "apples", "caption": "three red apples on a wooden table", "seed": 42}]
EOF
python inference.py --device auto --cases cases.json --output ./outputs
python inference.py --device auto --cases cases.json --count-head off --output ./out-count-off
python inference.py --device auto --cases cases.json --writing-lora off --output ./out-writing-off
python inference.py --device auto --cases cases.json --routing none --output ./out-routing-none
Offline use (local copy of Qwen3-0.6B, no network):
export HF_HUB_OFFLINE=1
python inference.py "A sunlit stone bridge over a calm mountain river" --device auto --text-encoder /path/to/Qwen3-0.6B --seed 42 --output bridge.png
$env:HF_HUB_OFFLINE = '1'
python inference.py "A sunlit stone bridge over a calm mountain river" --device auto --text-encoder .\Qwen3-0.6B --seed 42 --output bridge.png
Python API:
from inference import Generator
model = Generator(device="auto") # downloads Qwen/Qwen3-0.6B on first use
writing_image, writing_info = model.generate(
'A teal enamel sign reading "OPEN LATE" in a rainy shop window',
seed=42,
)
writing_image.save("sign.png")
Results
| Benchmark | Base (checkpoint 60463) |
0.1.0 |
|---|---|---|
| PixelGen-rephrased GenEval (2 seed batches, 0โ100) | 67.05 | 86.34 |
| Held-out composition (8 COCO classes unseen in training, 0โ100) | 59.00 | 87.94 |
| Held-out counting (8 unseen classes, exact count) | โ | 67.00% |
| Original GenEval (seed 42, 0โ1) | 0.600 | 0.859 |
| DPG-Bench (0โ100) | 83.98 | 84.28 |
| OneIG-Bench (EN) Overall (0โ100) | 33.18 | 38.71 |
| OneIG-Bench (EN) Text (0โ100) | 0.68 | 34.75 |
| MJHQ-30K FID โ (Sana protocol) | 13.38 | 10.33 |
| CVTG-2K word accuracy | 0.22% | 45.08% |
Measured on the whole model under default inference (512 ร 512, Euler 50 steps, CFG 8.0, no LLM prompt rewriting): on counting prompts, 8 initial noises each run 5 of the 50 steps and the counting head reads step-5 features to pick one candidate to finish to step 50; all other prompts use a single draw.
Comparison
| Model | Params | Resolution | Inference mode | BLIP3o-60K | GenEval โ | DPG-Bench โ |
|---|---|---|---|---|---|---|
| RG-T2I-L/16 (2026-10) | 912M | 512 ร 512 | single draw | Yes (120K mix) | 0.89 | 87.1 |
| MiniT2I-L/16 (2026-06) | 912M | 512 ร 512 | single draw | Yes (120K mix) | 0.883 | 85.9 |
| AMD Nitro-P (2026-11) | 679M | 512 ร 512 | single draw | Yes (120K mix) | 0.88 | 86.33 |
| UNIFIED-L (2026-11) | 554M | 256 ร 256 | single draw | Yes | 0.878 | 84.8 |
| HiRAE-24 (2026-09) | 875M | 256 ร 256 | single draw | Yes | 0.877 | 86.35 |
| JuZhou 1.0 (2026-06) | 385M | 1024 ร 1024 | single draw | No | 0.70 | โ |
| NanoGen (FLUX.2-VAE, 2026-06) | 612M | 256 ร 256 | single draw | No | โ | 84.1 |
| Haidass-Image-Instruct 0.1.0 (2026-11) | 0.6B | 512 ร 512 | counting 8-pick; others single draw | Yes (7,190 near-dups removed) | 0.859 | 84.28 |
Models โค1B published on or after 2026-05-30 (generator parameters; external models use single-draw generation without prompt rewriting). BLIP3o-60K contains 7,190 captions nearly identical to GenEval prompts; the five models listed first (0.877โ0.89) fine-tuned on it, and we removed those captions before training.
Limitations
- English text and routing trigger. Writing supports English text; for standard carriers (
sign,poster,reads,says,labeled,cover), quoted text must sit in the same sentence as the carrier word, and unquoted document prompts do not trigger the writing route. - Digits, punctuation, and complex scenes with text. CVTG-2K word accuracy is
7.69%for words with digits or punctuation vs49.59%for letters-only words. On complex multi-object scenes with quoted text, prioritizing lettering can shrink the main subject (84.28whole-model DPG-Bench vs84.58same-batch backbone; 70 quoted-text DPG prompts take the writing route and 35 take the counting route); pass--writing-lora offwhen scene composition matters more than text. - Counting head scope. Predicts classes
0โ6and7+at 50 sampling steps only (other step counts fall back to a single draw); gains on long descriptive prompts (~132 words, PixelGen-rephrased GenEval counting:+3.13pp,95% CI [โ1.82, +8.07]) are not significant, and a misparsed countNselects for that wrong count. - Route priority and cross-device seeds. When a prompt has both quoted text and a parsed count, the writing route takes precedence. Ascend NPU, CUDA, and CPU use different initial-noise generators, so the same seed produces different images across devices.
Demo
Live Gradio Space by HanWangTJU: https://huggingface.co/spaces/HanWangTJU/Haidass-Image-App (currently runs 0.0.1; will serve the full 0.1.0 model once updated to load the 0.1.0 weights and counting head).
Version history
- 0.1.0 (2026-11): Final release โ retrained from
Haidass-Image-Base-v1_0.6B_512pxon sentence-level cleaned data, followed by Flow-GRPO reinforcement learning (merged EMA weights), the writing LoRA (EMA), and counting head under unified routing. - 0.0.1 (preview, git tag
v0.0.1): Archived preview whose training data overlapped evaluation prompts; its scores are retired in favor of 0.1.0.
Citation
@misc{haidass-image-instruct,
author={DALabCommunity},
title={Haidass-Image-Instruct: A 0.6B Text-to-Image Model Post-Trained by Recursive Self-Improvement Agents on Ascend 910B},
year={2026},
url={https://huggingface.co/DALabCommunity/Haidass-Image-Instruct},
note={Version 0.1.0. Post-trained from Haidass-Image-Base-v1_0.6B_512px on 64 Ascend 910B NPUs}
}
For architecture, component breakdowns, the counting k curve, training hyperparameters, agent post-training workflow, evaluation protocols, full PowerShell commands, runtime, and complete comparison tables, see DETAILS.md.
- Downloads last month
- 131
