motif64

Image generation · Qwen-Image-2512 20B · diffusers · GB10 · 72 GB VRAM

published by @dh7 on

m64 m64_7fd3899470ff
Download .tar.gz

Qwen-Image-2512 text-to-image on GB10 (diffusers). Qwen's 20B MMDiT image model (Qwen2.5-VL-7B text encoder, Apache-2.0), strong at text rendering, at 1024x1024, 50 steps, guidance 5, bf16, all on the GPU (~58 GB). Runs fully offline.

Lineage

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

Files

6 files

AGENT.md

Qwen-Image-2512 20B text-to-image

This service turns a text prompt into a 1024x1024 PNG. It runs Qwen's Qwen-Image-2512, a 20B MMDiT with a Qwen2.5-VL-7B text encoder (Apache-2.0), strong at rendering text in images, through diffusers on one GPU, with gx10's qwen_image_gen_server.py. Generation settings are fixed by this capsule (size "1024x1024", num_inference_steps 50, guidance_scale 5.0). 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": 42}' \
  | 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["params_used"])'

Request fields:

  • prompt (string, required): what to draw.
  • seed (integer >= 0, optional): the random seed. The same prompt and seed give the same image. Leave it out for a random one.

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

The response is {"created": ..., "data": [{"b64_json": "<PNG, base64>"}], "params_used": {...}}.

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="qwen-image-2512-20b", prompt="a lighthouse at sunset",
                           response_format="b64_json", extra_body={"seed": 7})

GET /v1/config

The server's settings and what they mean.

GET /status

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

Timings and concurrency

  • First start: builds a container image and downloads about 58 GB of weights. After that, loading takes about 14 minutes (budgeted at 2400 s).
  • Each image takes about 85 s (50 steps at 1024x1024) on a DGX Spark (GB10).
  • Send requests one at a time, and allow at least 3 minutes per request in your client timeout.

Errors

  • 503 with Retry-After while the service is still starting.
  • 400: a field was rejected; the body's error says which and why.
  • 422: prompt missing or a field of the wrong type.
  • 5xx otherwise: retry once, then check GET /status.

capsule.toml

schema = "m64/capsule@1"description = "Qwen-Image-2512 text-to-image on GB10 (diffusers). Qwen's 20B MMDiT image model (Qwen2.5-VL-7B text encoder, Apache-2.0), strong at text rendering, at 1024x1024, 50 steps, guidance 5, bf16, all on the GPU (~58 GB). Runs fully offline."kinds = ["image.generate"]authors = ["dh7"]license = "apache-2.0"[hardware]platform = "linux-aarch64"gpu = "NVIDIA GB10"gpu_count = 1vram_gb = 72driver = ">=580"disk_gb = 60[runtime]sandbox = "container"# No image: the Dockerfile builds on vllm/vllm-openai (gemma4-cu130) + diffusers 0.37.1, pinned by digest.gpu = trueshm_gb = 8internal_port = 9009health = "/health"expected_load_seconds = 2400model_name = "qwen-image-2512-20b"user = "65534:65534"[[artifacts]]type = "hf"repo = "Qwen/Qwen-Image-2512"revision = "25468b98e3276ca6700de15c6628e51b7de54a26"include = [  ".gitattributes",  "README.md",  "model_index.json",  "scheduler/*",  "text_encoder/*",  "tokenizer/*",  "transformer/*",  "vae/*",]mount = "/qwen-image-gen-model"# The server's own defaults (qwen_image_gen_server.py), which every request gets: callers can only send# prompt and seed. Returned as params_used.[params]size = "1024x1024"num_inference_steps = 50guidance_scale = 5.0[routes]extra = ["/v1/config"]