motif64

Image generation · Z-Image-Turbo 6B · diffusers · GB10 · 32 GB VRAM

published by @dh7 on

m64 m64_60db135e0456
Download .tar.gz

Z-Image-Turbo 6B text-to-image on GB10 (diffusers). Tongyi-MAI's distilled 6B model (Qwen3-4B text encoder) at 1024x1024, 9 steps, CFG off, bf16. Strong at photorealism and at rendering English and Chinese text in images.

Lineage

parent
none declared
derived from
no published capsule shares half its files
children
none

Files

6 files

AGENT.md

Z-Image-Turbo 6B text-to-image

This service turns a text prompt into a 1024x1024 PNG. It runs Tongyi-MAI's Z-Image-Turbo, a distilled 6B diffusion transformer with a Qwen3-4B text encoder, through diffusers on one GPU. It is strong at photorealism and at rendering English and Chinese text inside the image. Generation settings are fixed: 1024x1024, 9 steps, guidance (CFG) 0, which the Turbo model requires. You send a prompt and, optionally, a seed.

Base URL: {{BASE_URL}}

Routes

POST /v1/images/generations

OpenAI-style image generation. Returns one image as base64 PNG.

curl -s {{BASE_URL}}/v1/images/generations {{AUTH}} \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a lighthouse at sunset", "seed": 7}' \
  | python3 -c 'import sys,json,base64; d=json.load(sys.stdin); open("out.png","wb").write(base64.b64decode(d["data"][0]["b64_json"])); print(d["seed"], d["params_used"])'

Request fields:

  • prompt (string, required): what to draw. English works best.
  • seed (integer >= 0, optional): the random seed. The same prompt and seed give the same image. Leave it out for a random one; the response's top-level seed field says which seed was used, so you can reproduce a result you liked.

Also accepted, for stock OpenAI clients: model (any string), n (must be 1), response_format (must be "b64_json"), size (must be "1024x1024"), user. Any other field, or a different value for a fixed one (for example "num_inference_steps": 4), is rejected with 400.

Response:

{"created": 1761530000, "model": "z-image-turbo-6b", "seed": 7, "elapsed_seconds": 13.4,
 "data": [{"b64_json": "<PNG, base64>"}],
 "params_used": {"size": "1024x1024", "num_inference_steps": 9, "guidance_scale": 0.0}}

The OpenAI Python SDK works too:

from openai import OpenAI
client = OpenAI(base_url="{{BASE_URL}}/v1", api_key="unused")
r = client.images.generate(model="z-image-turbo-6b", prompt="a lighthouse at sunset",
                           response_format="b64_json", extra_body={"seed": 7})

GET /v1/config

The fixed settings and the request fields this service accepts.

curl -s {{BASE_URL}}/v1/config {{AUTH}}

GET /status

Where the service is in its start-up: phase is one of building, downloading, starting, loading, warming, ready, error, with eta_seconds and, while starting, a wait_hint.

curl -s {{BASE_URL}}/status {{AUTH}}

Timings and concurrency

  • First start: builds a container image and downloads about 33 GB of weights. After that, loading and a warm-up take about 65 s (budgeted at 300 s).
  • Each image takes about 13.5 s on a DGX Spark (GB10).
  • Requests run one at a time; extra requests wait in line. Send them one by one, or a few in parallel at most, and allow at least 60 s per request in your client timeout.

Errors

  • 503 with Retry-After while the service is still starting: wait that many seconds and retry. GET /status shows progress.
  • 400: a field was rejected; the body's error says which and why.
  • 422: a request field has the wrong type (for example prompt missing or empty, seed negative).
  • 5xx otherwise: retry once, then check GET /status.

capsule.toml

schema = "m64/capsule@1"description = "Z-Image-Turbo 6B text-to-image on GB10 (diffusers). Tongyi-MAI's distilled 6B model (Qwen3-4B text encoder) at 1024x1024, 9 steps, CFG off, bf16. Strong at photorealism and at rendering English and Chinese text in images."kinds = ["image.generate"]authors = ["dh7"]license = "apache-2.0"[hardware]platform = "linux-aarch64"gpu = "NVIDIA GB10"gpu_count = 1# ~12 GB transformer + ~8 GB Qwen3-4B text encoder (bf16) + VAE and activations.vram_gb = 32driver = ">=580"disk_gb = 35[runtime]sandbox = "container"# No image: the Dockerfile builds on vllm/vllm-openai (gemma4-cu130) pinned by digest.gpu = trueshm_gb = 8internal_port = 9006health = "/health"expected_load_seconds = 300model_name = "z-image-turbo-6b"user = "65534:65534"[[artifacts]]type = "hf"repo = "Tongyi-MAI/Z-Image-Turbo"revision = "f332072aa78be7aecdf3ee76d5c247082da564a6"# Everything but assets/ (the model card's images and PDF).include = [  ".gitattributes", "README.md", "model_index.json",  "scheduler/*", "text_encoder/*", "tokenizer/*", "transformer/*", "vae/*",]mount = "/weights/zimage"[params]size = "1024x1024"num_inference_steps = 9guidance_scale = 0.0[routes]extra = ["/v1/config"]