retowyss/zeta-chroma-inference

Inference code to run the Zeta-Chroma model by lodestones.

0

stars

1

commits

Python

primary language

Mar 16, 2026

updated

README

Zeta-Chroma Inference

  • Claude Opus 4.6 did this with minimal guidance using black magic.
  • The model is Work In Progress.

Standalone inference script for Zeta-Chroma, a pixel-space DiT finetuned from Z-Image-Turbo.

No ComfyUI required — runs directly with PyTorch + Transformers.

Architecture

  • Model: 6.5B parameter NextDiT (single-stream transformer) with pixel-space SimpleMLPAdaLN decoder
  • Text encoder: Qwen3ForCausalLM (from Z-Image-Turbo, hidden_states[-2], 2560-dim)
  • Patch size: 32×32 pixels
  • Prediction: x0 (clean image), converted to velocity for Euler sampling
  • Precision: BF16

Setup

Requires Python 3.13+ and uv:

uv sync

Model weights (~13GB) and the text encoder are downloaded automatically from Hugging Face on first run.

Usage

# Basic generation (1024×1024, 30 steps, no CFG)
uv run python inference.py --prompt "a cat sitting on a windowsill"

# With classifier-free guidance and negative prompt
uv run python inference.py \
  --prompt "a portrait photograph" \
  --negative_prompt "blurry, low quality, deformed" \
  --cfg_scale 3.0 --steps 12

# Custom resolution and seed
uv run python inference.py \
  --prompt "a landscape" \
  --width 1024 --height 1024 \
  --seed 123 --output landscape.png

Options

FlagDefaultDescription
--prompt(required)Text prompt (up to 512 tokens)
--negative_prompt""Negative prompt (only used when cfg_scale > 1.0)
--outputoutput.pngOutput file path
--width1024Image width (must be divisible by 32)
--height1024Image height (must be divisible by 32)
--steps30Sampling steps (12 to 70 recommended)
--cfg_scale0.0CFG scale (0.0 = no guidance, 3.0 = moderate)
--seed42Random seed
--max_tokens512Max text encoder tokens

Based on experimentation:

  • Best resolution: 512x512, 1024×1024 (?)
  • Steps: 12 - 70 (?) for a good quality/speed tradeoff
  • CFG: 0.0 works; 3.0 with a negative prompt for more guidance
  • Speed (RTX 5090): ~9 it/s at 1024², ~25 it/s at 512²

Contributors

example123

1 commits

retowyss/zeta-chroma-inference

Inference code to run the Zeta-Chroma model by lodestones.

0

stars

1

commits

Python

primary language

Mar 16, 2026

updated

README

Zeta-Chroma Inference

  • Claude Opus 4.6 did this with minimal guidance using black magic.
  • The model is Work In Progress.

Standalone inference script for Zeta-Chroma, a pixel-space DiT finetuned from Z-Image-Turbo.

No ComfyUI required — runs directly with PyTorch + Transformers.

Architecture

  • Model: 6.5B parameter NextDiT (single-stream transformer) with pixel-space SimpleMLPAdaLN decoder
  • Text encoder: Qwen3ForCausalLM (from Z-Image-Turbo, hidden_states[-2], 2560-dim)
  • Patch size: 32×32 pixels
  • Prediction: x0 (clean image), converted to velocity for Euler sampling
  • Precision: BF16

Setup

Requires Python 3.13+ and uv:

uv sync

Model weights (~13GB) and the text encoder are downloaded automatically from Hugging Face on first run.

Usage

# Basic generation (1024×1024, 30 steps, no CFG)
uv run python inference.py --prompt "a cat sitting on a windowsill"

# With classifier-free guidance and negative prompt
uv run python inference.py \
  --prompt "a portrait photograph" \
  --negative_prompt "blurry, low quality, deformed" \
  --cfg_scale 3.0 --steps 12

# Custom resolution and seed
uv run python inference.py \
  --prompt "a landscape" \
  --width 1024 --height 1024 \
  --seed 123 --output landscape.png

Options

FlagDefaultDescription
--prompt(required)Text prompt (up to 512 tokens)
--negative_prompt""Negative prompt (only used when cfg_scale > 1.0)
--outputoutput.pngOutput file path
--width1024Image width (must be divisible by 32)
--height1024Image height (must be divisible by 32)
--steps30Sampling steps (12 to 70 recommended)
--cfg_scale0.0CFG scale (0.0 = no guidance, 3.0 = moderate)
--seed42Random seed
--max_tokens512Max text encoder tokens

Based on experimentation:

  • Best resolution: 512x512, 1024×1024 (?)
  • Steps: 12 - 70 (?) for a good quality/speed tradeoff
  • CFG: 0.0 works; 3.0 with a negative prompt for more guidance
  • Speed (RTX 5090): ~9 it/s at 1024², ~25 it/s at 512²

Contributors

example123

1 commits

Languages

Python

100.0%