Pixel32 Bilingual (EN + ZH) β€” 32Γ—32 RGBA Pixel-Art Models (v3 Reflow Default)

Clean-room Apache-2.0 32Γ—32 transparent RGBA pixel-art generators trained from scratch on Google Colab for English and Simplified Chinese prompts β€” running 100% locally in the browser via ONNX / WebGPU.

Recommended Default: v3_reflow/ (50.7M Β· 60.2 MB INT8 Β· 4-Pass OKLab Flow)

Pixel32 v3 replaces the 107M discrete-token Hourglass (v2 / v2.1) with a 50.7M continuous OKLab + Alpha Pixel-Space Flow Matching DiT (PixFlow32), then straightens its Euler 16s CFG 3.5 teacher trajectories via 1-stage Rectified Flow (Reflow) over 200k teacher pairs (2M views) into a 4-pass, CFG-free (1Γ— conditional) student:

  • Browser INT8 ONNX (60.15 MB): v3_reflow/pixflow32_student_int8.onnx β€” Opset 18, FP32 I/O + 68 per-channel QInt8 DequantizeLinear MatMul weights (4-step trajectory endpoint cosine 0.9986 vs PyTorch FP32, 8-step 0.99998).
  • FP16 ONNX (102.04 MB): v3_reflow/pixflow32_student_fp16.onnx β€” Opset 18, FP16 I/O (0.9999998 4-step endpoint cosine).
  • Preset Embeddings (5.46 MB): v3_reflow/preset_embeddings.json β€” 41 EN + δΈ­ζ–‡ showcase presets with exact SigLIP-2 valid_len masks.
  • Default Sampler: Midpoint 2s (4 model forward passes total, cfg = 1.0, tier = 1) + OKLab β†’ sRGB decode + frequency-weighted 20-medoid palette snap.
  • Quality: Beats the 107M v2.1 Teacher (32 passes) at half the parameters, 47% smaller INT8 download, and 2Γ— fewer passes than v2 Turbo (8 passes), with 0.0 dust and 0 blanks.

Version Progression (3-Seed Standardized Eval)

Model Prefix Arch / Params INT8 ONNX Passes (CFG) 3s Comp Cos EN Cos (Top-1) VU Cos CN Cos (Top-1)
Pixel32 v3 Teacher v3_teacher/ 50.7M OKLab Flow 102.0 MB (FP16) 32 (Euler 16s, CFG 3.5) 0.1900 0.1997 (100%) 0.1903 0.1800 (95.8%)
Pixel32 v3 Reflow (Default) v3_reflow/ 50.7M OKLab Reflow 60.2 MB 4 (Midpoint 2s, 1Γ— cond) 0.1852 0.1978 (100%) 0.1820 0.1757 (95.8%)
Pixel32 v2.1 Teacher v2_1/ 107M Discrete MDLM β€” 32 (16s, CFG 3.5) 0.1839 β€” β€” β€”
Pixel32 v2.1 Turbo v2_1/ 107M Discrete MDLM 113.5 MB 12 (12s min_p, 1Γ— cond) 0.1763 β€” β€” β€”
Pixel32 v2 Turbo v2/ 107M Discrete MDLM 113.5 MB 8 (8s fg_conf, 1Γ— cond) 0.1711 0.1795 0.1712 0.1627
Pixel32 v1 (Original) onnx/ 48.4M Discrete MDLM 53.5 MB 32 (16s, CFG 3.0) β€” 0.1991* β€” 0.1679*

*v1 numbers from original 1-seed 16-way Gate 3 eval; v2–v3 rows use the same standardized 3-seed unseen EN / val_unseen / CN benchmark.

Pixel32 v3 Reflow Previews (Midpoint 2s, 4 Passes, 1Γ— Conditional)

Unseen English Prompts

Pixel32 v3 Reflow EN

Unseen Chinese Prompts (δΈ­ζ–‡)

Pixel32 v3 Reflow CN

Held-Out val_unseen Prompts

Pixel32 v3 Reflow Val Unseen

Pixel32 v3 Teacher Previews (Euler 16s, CFG 3.5)

Pixel32 v3 Teacher EN Pixel32 v3 Teacher CN

ONNX Inference Contract (v3_reflow/pixflow32_student_int8.onnx)

  • Text Encoder: Frozen google/siglip2-base-patch16-224 (max_length=64, lowercased; browser pruned EN+ZH INT8 weights at onnx/siglip2_enzh/text_model_enzh_int8.onnx + vocab_remap.bin).
  • Important SigLIP-2 Masking Rule: Pass only input_ids into SiglipTextModel (do not pass attention_mask into the text encoder), then pass the boolean non-padding mask text_mask ([1, 64], true for real tokens and false for pad) into PixFlow32 cross-attention.
  • Model Inputs:
    • z: float32[1, 4, 32, 32] β€” standardized premultiplied (L, a, b, alpha) state (center=[0.5, 0, 0], scale=[0.5, 0.35, 0.35], alpha ∈ [-1, 1]), starting from N(0, I) at t = 0.
    • t: float32[1] β€” flow time in [0, 1].
    • text: float32[1, 64, 768] β€” last_hidden_state from SigLIP-2.
    • pooled: float32[1, 768] β€” pooler_output from SigLIP-2.
    • text_mask: bool[1, 64] β€” valid token mask (1..valid_len).
    • tier: int64[1] β€” set to [1] (gold HQ tier).
  • Output: velocity: float32[1, 4, 32, 32].
  • Integration (Midpoint 2s, 4 passes):
    1. v1 = f(z, 0.0); z_mid = z + 0.25 * v1; v_mid = f(z_mid, 0.25); z = z + 0.5 * v_mid
    2. v1 = f(z, 0.5); z_mid = z + 0.25 * v1; v_mid = f(z_mid, 0.75); z = z + 0.5 * v_mid
  • Decode: Threshold z[:, 3] >= 0 for opaque pixels, clamp z[:, :3] to [-1, 1], denormalize OKLab (L = zL * 0.5 + 0.5, a = zA * 0.35, b = zB * 0.35), convert OKLab β†’ sRGB, and apply frequency-weighted 20-medoid projection in OKLab space for crisp pixel-art palettes.

Repository Layout

  • v3_reflow/ β€” Recommended default 50.7M 4-pass Reflow student (pixflow32_student_int8.onnx, pixflow32_student_fp16.onnx, preset_embeddings.json, PyTorch EMA weights, student_manifest.json).
  • v3_teacher/ β€” 50.7M PixFlow32 OKLab Flow teacher (pixflow32_ema.pt, pixflow32_fp16.onnx, teacher_manifest.json).
  • onnx/siglip2_enzh/ β€” Pruned EN+ZH INT8 SigLIP-2 text encoder (133 MB) shared by v2 and v3 browser runtimes.
  • v2/, v2_1/, v1_5/, v1_5b/, distill_v1/, onnx/ β€” Archived earlier discrete-diffusion checkpoints and ONNX exports preserved for reproducibility and live comparison.

Legacy v1 Previews

Bilingual EN vs ZH (v1) Chinese Showcase (v1)

Downloads last month
655
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using dlwj/pixel32-bilingual 1