--- language: - en - zh pipeline_tag: text-to-image tags: - pytorch - flow-matching - art datasets: - kaupane/chinese-painting-collection - kaupane/wikiart-captions - kaupane/human-recaption - kaupane/pexels-people-captions - kaupane/relaion-art-recap-zh - kaupane/vintage-photography-captions - kaupane/z-image-turbo-gen - kaupane/inko-rollout-25k - opendiffusionai/cc12m-a_woman - Spawning/PD12M - sirus/inaturalist-2024-2.8k-claude-opus-5-recaptioned - sirus/megalith-10m-5.5k-claude-opus-5-recaptioned ---

Inko

A 0.5B text-to-image model for fine art, in English and Chinese.

GitHub & technical report · Try the demo

Inko is a text-to-image model trained for painting and illustration across Chinese and Western traditions. Its 532M-parameter flow-matching transformer pairs a curated four-domain art corpus with caption and resolution curricula, chunked Muon optimization on Ascend, and DiffusionART post-training against a self-produced prompt and rubric pool. The full engineering record — data, pretraining, post-training and evaluation — is in the [GitHub repository](https://github.com/Mtrya/inko). **Release model: the EMA of the specialized post-training run** (60 DiffusionART rounds on the completed 300-round main run), built on the 600k pretrained EMA. The pretrained base remains available at tag [`pretrain-base`](https://huggingface.co/kaupane/Inko/tree/pretrain-base). ## Gallery ![Inko generations: ink-wash landscape and figure, gongbi bird and peony on silk, blue-green landscape with palace, hanfu in an Impressionist garden, a classical garden, dim sum and a lantern-lit canal](assets/hero1-banner.jpg) ![Inko generations: Monet, Renoir, Pissarro, Van Gogh, an Art Nouveau portrait, Fauvist harbor, Symbolist garden, Baroque pomegranates and a red fox in snow](assets/hero2-banner.jpg) All images are generated by the release model at 20 Euler steps and CFG 4.5. Prompts, seeds and canvas sizes are in the manifests ([hero1](https://github.com/Mtrya/inko/blob/main/notes/assets/gallery/hero1/manifest.jsonl), [hero2](https://github.com/Mtrya/inko/blob/main/notes/assets/gallery/hero2/manifest.jsonl)). ## Results ![Full-catalog results on GenEval, DPG, OneIG alignment, TIIF long and Qwen-Image. The seven references are ranked within each panel. Inko base and Inko are separated on the right, and a dashed line marks Inko's score across the references.](assets/benchmark_overview.png) The chart compares nine models on five public benchmarks (GenEval, DPG, OneIG English, TIIF testmini and Qwen-Image-Bench), each run under its native inference recipe: Inko, the pretrained Inko base, and seven external references. Inko competes directly with the similarly sized DreamLite, SANA-0.6B and PixArt-Σ, and approaches the much larger SD3.5 Medium on DPG, OneIG alignment and Qwen-Image-Bench. Dense prompt alignment is its strongest general result, and its diversity is high relative to models with comparable alignment. Protocol, full tables, per-benchmark analysis and a fine-art comparison suite: [the evaluation chapter](https://github.com/Mtrya/inko/blob/main/notes/evaluation.md). ## Quickstart ```bash git clone https://github.com/Mtrya/inko cd inko pip install -e . ``` ```python import torch from src.pipeline import InkoPipeline pipe = InkoPipeline.from_pretrained( "kaupane/Inko", torch_dtype=torch.bfloat16 ).to("cuda") image = pipe( "中国水墨画,远山笼罩在薄雾中,近处一棵松树伸向江面,一叶小舟停在岸边。", width=1920, height=1088, generator=torch.Generator(device="cpu").manual_seed(42), ).images[0] image.save("inko.png") ``` The release defaults are 896 × 896, 20 Euler steps, and CFG 4.5. Width and height must be multiples of 16, up to 1920 per axis; above the 1184-pixel training reference, Dy-YaRN scaling applies automatically. Use Python 3.12 and a CUDA GPU. ## Model at a glance | Dimension | Choice | |---|---| | Model | Hidden width 1152, 16 heads, 1 double-stream + 24 single-stream blocks, FFN width 3072, 532,496,992 parameters | | Text | Frozen Qwen3-0.6B, encoded online with an early exit after layer 20 | | Latents | Qwen-Image VAE, 16 channels, factor 8; 2×2 latent patches | | Objective | Rectified flow with logit-normal timestep sampling and resolution time shift | | Resolution | Variable-aspect 256p → 640p → 896p; 75:20:5 split of 600,000 optimizer updates | | Post-training | DiffusionART with attention LoRA (rank 64), Muon 1e-3, EMA 0.999; seven reward channels dominated by five rubric categories | | Training hardware | Ascend (16×910B2C) for both pretraining and post-training | ## Training journey - [Data](https://github.com/Mtrya/inko/blob/main/notes/data.md): four domains (Chinese painting, Western art, people and anatomy, world knowledge), about 1.7M eligible rows at 256p, bilingual 50:50 captions, with per-dataset galleries and the curation story of each source. - [Pretraining](https://github.com/Mtrya/inko/blob/main/notes/pretraining.md): architecture under the 0.6B budget, packing and the measured CUDA/Ascend kernel work (+33.92% throughput), the loss-spike investigation, and the full-run stability record. - [Post-training](https://github.com/Mtrya/inko/blob/main/notes/posttraining.md): the DiffusionART selection campaign, the 24.6k-row rollout pool ([kaupane/inko-rollout-25k](https://huggingface.co/datasets/kaupane/inko-rollout-25k)), the rubric reward, and the two production runs. - [Evaluation](https://github.com/Mtrya/inko/blob/main/notes/evaluation.md): five benchmark catalogs, nine models, and a fixed fine-art comparison suite with per-case analysis. ## Limitations - Exact rendered text and spatial relations remain weak. - Anatomy still breaks at times; reasoning, counting and world knowledge remain weak. - Negation in dense scenes is unreliable: asked for a busy intersection with no blue cars, Inko, like most references, paints the cars. - The corpus includes research-only sources; per-sample license metadata is preserved in the training configuration.