
ZYI FLASH
A small text-to-image + instruction image-editing model at 256×256 — the next version of ZYI-256 Flash, fine-tuned in a single session on one NVIDIA RTX PRO 6000.

What's new vs ZYI-256 Flash
- Glyph branch: text in quotes (
a sign that says "OPEN") is also read character by character by a frozen ByT5-small encoder, projected into the same cross-attention as flan-T5 — this is what lets the model spell words. - Spell: quoted text is also spelled out in the caption (
"OPEN" (O P E N)), in training and at inference (spell=True). - 16 register tokens: a learned global "scratchpad" in the DiT sequence that helps counting and layout.
- Data emphasis: 3× more images with text, 2× more captions with counts, and a final high-quality annealing phase (top 35% by FLUX-Reason quality scores).
- Image editing (in-context source tokens + text/image CFG) is kept.
| Generator | DiT, 1024d × 20 blocks, rectified flow, 2D RoPE, QK-norm, adaLN-single |
| Latent | DC-AE f32c32 — 256 px → 8×8×32 (64 tokens) |
| Text | flan-T5-base (frozen) + ByT5-small glyph encoder (frozen) |
| Training | +20,892 steps from caikybaldo999/zyi-256-flash, 75% text-to-image / 25% editing, 9.4 h |
| Data | 1,000,000 images from FLUX-Reason-6M, 176,182 edit pairs from OmniEdit (MIT) |
Usage
import importlib.util
from huggingface_hub import hf_hub_download
spec = importlib.util.spec_from_file_location("zyi_flash", hf_hub_download("caikybaldo999/zyi-flash", "zyi_flash.py"))
zf = importlib.util.module_from_spec(spec); spec.loader.exec_module(zf)
pipe = zf.ZyiPipeline("caikybaldo999/zyi-flash")
pipe('a shop sign that says "OPEN"', n=4, seed=0) # text -> image
from PIL import Image
pipe.edit(Image.open("photo.jpg"), "make it winter, add snow", seed=0) # image editing
Requires torch, diffusers, transformers, safetensors, huggingface_hub. English prompts.

Editing — each row: source · edited · reference.
Limitations
256×256 output with an 8×8 latent grid: long text, small faces and fine details are still hard.