motif64

Image generation · Kromoss DMD2 8-step · diffusers · GB10 · 40 GB VRAM

published by @dh7 on

m64 m64_ea65644cdec9
Download .tar.gz

Kromoss + DMD2 8-step LoRA text-to-image on GB10 (diffusers). lodestones/Kromoss (MOSS-Image fine-tune) with its 8-step DMD2 LoRA: 1024x1024, 8 steps, CFG 1, shift 5, bf16. About 19 s per image on a DGX Spark (GB10).

Lineage

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

Files

6 files

AGENT.md

Kromoss + DMD2 8-step text-to-image

This service turns a text prompt into a 1024x1024 PNG. It runs lodestones/Kromoss (a full fine-tune of MOSS-Image-Base, Apache-2.0) with the author's 8-step DMD2 turbo LoRA, through diffusers on one GPU. The text encoder is Qwen3.5-9B, so long, detailed prompts work well. Generation settings are fixed: 1024x1024, 8 steps, guidance (CFG) 1 with no negative prompt, flow-matching shift 5. 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 tabby cat holding a sign that says MOSS", "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["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, byte for byte. 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": 50 or "negative_prompt": "..."), is rejected with 400.

Response:

{"created": 1761530000, "model": "kromoss-dmd2", "seed": 42, "elapsed_seconds": 19.0,
 "data": [{"b64_json": "<PNG, base64>"}],
 "params_used": {"size": "1024x1024", "num_inference_steps": 8, "guidance_scale": 1.0,
                 "shift": 5.0, "lora": "8-steps-dmd2-lora"}}

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="kromoss-dmd2", 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 30 GB of weights. After that, loading and a warm-up take a few minutes (budgeted at 420 s).
  • Each image takes about 19 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 120 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 = "Kromoss + DMD2 8-step LoRA text-to-image on GB10 (diffusers). lodestones/Kromoss (MOSS-Image fine-tune) with its 8-step DMD2 LoRA: 1024x1024, 8 steps, CFG 1, shift 5, bf16. About 19 s per image on a DGX Spark (GB10)."kinds = ["image.generate"]authors = ["dh7"]license = "apache-2.0"[hardware]platform = "linux-aarch64"gpu = "NVIDIA GB10"gpu_count = 1# ~10 GB transformer + ~17 GB Qwen3.5-9B text encoder (bf16) + fp32 VAE and LoRA.vram_gb = 40driver = ">=580"disk_gb = 40[runtime]sandbox = "container"# No image: the Dockerfile builds on nvcr.io/nvidia/pytorch:25.09-py3 pinned by digest.gpu = trueshm_gb = 8internal_port = 9219health = "/health"# Measured: ~335 s to load off NFS in the source recipe; local NVMe is faster.expected_load_seconds = 420model_name = "kromoss-dmd2"user = "65534:65534"# Same file set as the original download script (which excludes diffusion_models/*,# text_encoders/*, assets/* and *.webp: the ComfyUI repackings and the card images).[[artifacts]]type = "hf"repo = "lodestones/Kromoss"revision = "7f9bb7b06d7b6c27d294b0bab5a2b3056c379279"include = [  ".gitattributes", "LICENSE", "README.md", "model_index.json", "*.py",  "8-steps-*.safetensors",  "scheduler/*", "text_encoder/*", "tokenizer/*", "transformer/*", "vae/*",]mount = "/weights/kromoss"[params]size = "1024x1024"num_inference_steps = 8guidance_scale = 1.0shift = 5.0lora = "8-steps-dmd2-lora"[routes]extra = ["/v1/config"]