# kromoss-image: an image model inside a capsule. # # What this example adds to model-for-opencode: # - the image.generate kind: m64's front lets POST /v1/images/generations # through, and only `prompt` and `seed` in its body; # - [params]: the settings the server bakes in, published so callers (and the # site) can see them; a caller may send the same value, never another; # - [routes] extra: one more path, /v1/config, that the front lets through; # - a Dockerfile on NVIDIA's PyTorch image, with every pip package pinned. schema = "m64/capsule@1" description = "An image model in a capsule: Kromoss with its 8-step DMD2 LoRA on diffusers, text to 1024x1024 PNG in about 19 s on a GB10. Shows the image.generate kind, [[artifacts]] for 40 GB of weights, [params] and an extra route." kinds = ["image.generate"] authors = ["motif42"] license = "mit" [hardware] # Built and measured on an NVIDIA GB10 (DGX Spark class, ARM). The base image is # also built for x86_64; on a big x86 card set platform and gpu to match it. platform = "linux-aarch64" gpu = "NVIDIA GB10" gpu_count = 1 # ~10 GB transformer + ~17 GB Qwen3.5-9B text encoder (bf16) + fp32 VAE and LoRA. # On unified memory (GB10) m64 adds ram_gb to this; here it is all in vram_gb. vram_gb = 40 driver = ">=580" disk_gb = 40 [runtime] sandbox = "container" # No image: m64 builds the Dockerfile (nvcr.io/nvidia/pytorch pinned by digest). gpu = true # PyTorch's data loaders and CUDA IPC use shared memory: give it more than the 1 GB default. shm_gb = 8 internal_port = 9219 health = "/health" # Reading ~40 GB of weights and moving them to the GPU takes minutes. expected_load_seconds = 420 model_name = "kromoss-dmd2" user = "65534:65534" # The weights: one Hugging Face repo at a fixed commit, only the files the # diffusers pipeline needs (the repo also has ComfyUI repackings and card images). # m64 downloads them on the first serve (or `m64 install`), verifies them, and # mounts them read-only at /weights/kromoss. With models_dir set # (`m64 config set models_dir /mnt/models`), they live there, shared by capsules. [[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" # Baked into kromoss_server.py; returned as `params_used` with every image. [params] size = "1024x1024" num_inference_steps = 8 guidance_scale = 1.0 shift = 5.0 lora = "8-steps-dmd2-lora" # /v1/config describes the fixed settings and the accepted fields. The front # lets it through; every other path that isn't a kind route is a 404. [routes] extra = ["/v1/config"]