MOSS-Image 5B on Apple Silicon: SFT vs DMD Distillation Benchmark
🧩 0. Why MOSS-Image needed a custom pipeline on the Mac
The official MOSS-Image release is a PyTorch/diffusers pipeline written for big NVIDIA GPUs. As shipped, it wants a ~19 GB bf16 Qwen 3.5 9B text encoder, a ~10 GB 5B DiT and an fp32 VAE resident at the same time — about 30 GB, roughly twice what a 16 GB Mac has. A naive port either crashes or falls back to the CPU for the text encoder (~61 s per prompt) and then takes 40+ minutes per image.
DiffusionBear v0.4.1 rebuilds that pipeline stage by stage so it fits a 16 GB M1 and finishes in minutes:
summary/items layout (abs_centralized, yxyx): background, wordmark, logo slot, captions.0 GB · in-app- DMD kits are downloaded on first use (~1.2 GB each, resumable): a projection LoRA, a distilled fp32 time embedding and a dataspace schedule. With no network, the app falls back to the stock trajectory instead of failing.
- Why not a ready-made 4-bit Qwen? Community conversions quantise their reference weights; MOSS uses a bare
Qwen3_5Modelsubset. Converting locally guarantees the 8-bit scales come from the exact tensors MOSS reads — and lets us keep the delta-rule projections in bf16. 4-bit was measured and rejected (parity fell to 0.964). - Nothing to configure. In the Generate tab, pick MOSS-Image SFT 5B, draw your boxes, and leave the DMD distillation control on Auto.
🐻 1. One prompt, one seed, three inference pipelines
A single press-kit poster — a structured layout (virtual bounding boxes: alpine-lake background, wortmark, logo slot, version line, engine credits) — was rendered by the same MOSS-Image SFT 5B checkpoint through the three pipelines DiffusionBear supports. Identical seed (1024), identical resolution (768×512), identical layout JSON, identical text-encoder path. Only the sampler schedule and the CFG handling change:
- Stock SFT (30 steps, CFG 3.0): the reference pipeline. Flow-matching Euler over a discrete schedule, two transformer forwards per step (conditional + unconditional). Maximum detail budget, maximum wall time (~43–46 min per poster).
- DMD 8-step (lodestones adapter): the Distribution Matching Distillation adapter replaces the sampling schedule with 8 learned dataspace codes and folds the t=1 CFG vector into a fp32 time embedder — one forward per step, no unconditional pass (~13–14 min).
- DMD 4-step (darask0 adapter): the same machinery at 4 codes: fastest MOSS arm (~7.5–8.5 min), the most compressed trajectory.
Distillation adapters do not merely skip steps: each arm is a genuinely different sampler (different trajectory family, CFG-free vs CFG-on), like our earlier Krea-2 4/6/8-step finding. All comparisons below must be read as pipeline comparisons, not quality gradations of one pipeline.
| Pipeline | Adapter / LoRA | Sampler | Steps | CFG | Transformer / step | Vectorial dawn | Belle Époque 1900s | s/step (avg) |
|---|---|---|---|---|---|---|---|---|
| Stock SFT | — | flow_match_euler_discrete | 30 | 3.0 (+ negative slot) | 2 (cond + uncond) | 2577.3s | 2738.8s | ≈85.8 / 91.3 |
| DMD 8-step | lodestones-8step | moss_dataspace_dmd | 8 | 1.0 (folded) | 1 | 784.0s | 859.2s | ≈98.0 / 107.4 |
| DMD 4-step | darask0-4step | moss_dataspace_dmd | 4 | 1.0 (folded) | 1 | 449.4s | 502.9s | ≈112.4 / 125.7* |
🔬 2. What every arm shared
- Checkpoint: OpenMOSS-Team/MOSS-Image-SFT 5B (DiT), bf16, MLX.
- Text encoder: Qwen 3.5 9B running on GPU through our MLX 8-bit conversion (g64, GDN layers kept bf16) — parity 0.9995 cos vs the torch bf16 reference (full write-up), ~17s per prompt instead of ~61s on CPU.
- Structured layout: virtual bounding boxes serialized into the official
summary/itemsJSON layout (abs_centralized,yxyx): full-surface background box, bold wordmark, logo slot, "V 0.4.1 beta" + "now runs", engine credits in the bottom corners. - Seed 1024, 768×512, FLUX.2-family fp32 VAE decode, no fast-VAE.
- *s/step caveat: DMD arms carry ~2-3 min of fixed overhead (text-encoder pass, 252 LoRA wraps, adapter load) that dilutes their per-step average; the stock arm pays two forwards per step instead.
🚀 Practical takeaways
In-app, DiffusionBear auto-selects the DMD adapters for runs ≤ 8 steps (4 → darask0, 5–8 → lodestones) and keeps stock trajectories above. For poster work where text on the layout matters most, the 30-step stock arm renders the most stable lettering; for fast iteration the 4-step arm is 5.7× cheaper. All arms run 100% locally, offline, on a single 16 GB M1 — no cloud, no subscription.