ZYI 2 Flash

ZYI 2 Flash

A small multilingual text-to-image model (369M parameters + frozen Qwen3-1.7B) that generates 512×512 images. It continues from caikybaldo999/zyi-256-flash and was fine-tuned in under 10 hours on a single RTX PRO 6000.

samples

What changed from ZYI-256 Flash

ZYI-256 Flash ZYI 2 Flash
Resolution 256×256 (64 tokens) 512×512 (256 tokens)
Text encoder flan-t5-base Qwen/Qwen3-1.7B + 2-layer text refiner
Prompt languages English English, Portuguese and others (Qwen3 is multilingual)
Positional encoding 2D RoPE on an 8×8 grid 2D RoPE with interpolated positions (16×16 grid)

Training

  • Phase A (1 h): DiT frozen except cross-attention; the new text refiner learns to read Qwen3.
  • Phase B: all weights at 512×512, resolution-dependent timestep shift, EMA.
  • Steps: 2,426 (on top of 42,981 from the base model), batch 256
  • Data: 566,408 images from LucasFang/FLUX-Reason-6M (1024 px, downscaled to 512), short or long caption per sample, 15% Chinese captions for multilingual alignment
  • Hardware: 1× NVIDIA RTX PRO 6000 (96 GB), 3.5 h

Usage

pip install torch diffusers "transformers>=4.51" safetensors huggingface_hub
from huggingface_hub import hf_hub_download
import importlib.util

path = hf_hub_download("caikybaldo999/zyi-2-flash", "zyi2.py")
spec = importlib.util.spec_from_file_location("zyi2", path)
zyi2 = importlib.util.module_from_spec(spec); spec.loader.exec_module(zyi2)

pipe = zyi2.Zyi2Pipeline("caikybaldo999/zyi-2-flash")
pipe("a misty mountain lake at sunrise with pine trees", seed=0)[0].save("lake.png")
pipe("um gato laranja dormindo em cima de um sofá azul", seed=1)[0].save("gato.png")

Runs in bfloat16 on Ampere or newer GPUs and in float32 on older GPUs (e.g. T4) or CPU.

Limitations

  • Spatial relations and counting are better than ZYI-256 but still unreliable.
  • Weak at readable text, hands and close-up faces.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for caikybaldo999/zyi-2-flash

Finetuned
(1)
this model

Dataset used to train caikybaldo999/zyi-2-flash