How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("OpenMOSS-Team/MOSS-Image-SFT", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("akhaliq/MOSS-Image-SFT-4-steps")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

Built with ML Intern

MOSS-Image-SFT-4-steps

⚑ Demo: MOSS-Image 4-Step Turbo Space

πŸ†• v2.0 (2026-10-18) β€” major update, usage changed. The model is now Euler-native: a single lora.safetensors that runs on the stock flow-matching Euler sampler (any LoRA loader, 4 steps, CFG 1) β€” the custom data-space sampler and the time_embedding.safetensors / dataspace.safetensors files are no longer needed and were removed from the repo root. If you used v1.x adapters, grab the old data-space variant from checkpoint-update-400/ (it keeps its own sampler), or switch to the new one-line loader below. New users: just follow the Quickstart.

The fastest high-fidelity MOSS-Image-SFT: 4 steps, no CFG, one LoRA file, stock sampler. No custom loop, no auxiliary safetensors, no pipeline patches β€” it drops into any standard LoRA loader.

4-step generations: bilingual cafe menu and neon Shanghai street, text intact

Both images above were generated by this model in 4 steps, no CFG β€” "TODAY'S SPECIAL / Flat White $4.50" and ζ·±ε€œι£Ÿε ‚ render correctly.

License: Apache-2.0 β€” commercial use OK.

Why this one

Claim Evidence
Only 4-step MOSS-Image that runs on the stock sampler in any LoRA loader β€” ComfyUI LoraLoaderModelOnly, or diffusers via the bundled apply_lora.py (the custom pipeline has no load_lora_weights), release flow-Euler scheduler, CFG 1 v3 is trained natively on the release schedule (anchors t = 1000/910/717/24), not adapted to it
Best text/numeric fidelity of any few-step MOSS-Image 4-way head-to-head, same prompts + seeds: this model is the only one that renders "62% / 38%" correctly β€” darask0's rapid-moss and lodestones' lora_latest both garble secondary numbers (see strips below)
Bilingual text rendering (δΈ­ζ–‡ + English) Signage-lexicon trained v1.1+: "OPEN 24H", menus, infographics, Chinese storefronts
No tiling at 2048Β² Verified 1024Β² / 1536Γ—1024 / 2048Β² (tiling_probe/)
Fully packaged All-in-one repo (pipeline + text encoder + VAE), inference.py CLI, live ZeroGPU demo, training code included

~11 s per 1024Γ—1024 image on one A100 (4 forwards, bf16 base + fp32 LoRA), no CFG, no negative prompt. Distilled via data-space DMD (arXiv 2610.12102), warm-started from lodestones/MOSS-Image-SFT-8-steps-dmd.

Quickstart

🟒 Easiest β€” ComfyUI (recommended)

  1. Update ComfyUI (needs the MOSS-Image support from 16 Oct 2026 β€” the Load CLIP node must offer type moss_image).

  2. Download 4 files into your ComfyUI folders:

    File Put in Source
    moss_image_sft_bf16.safetensors (10 GB) models/diffusion_models/ Comfy-Org/MOSS-Image
    qwen3.5_9b_int8_convrot.safetensors (10 GB) models/text_encoders/ Comfy-Org/MOSS-Image
    flux2-vae.safetensors (0.3 GB) models/vae/ Comfy-Org/MOSS-Image
    moss_image_sft_4step_v2.0.safetensors (1.2 GB) models/loras/ this repo
  3. Drag comfyui/moss-image-4step-turbo.json onto the canvas and hit Queue. The workflow already has the right settings: LoraLoaderModelOnly at strength 1.0, sampler euler / simple, 4 steps, CFG 1.0.

⚠️ Running the default MOSS-Image template (25–50 steps, CFG 2.5–3) with this LoRA gives smudged, overcooked output β€” the distilled model wants 4 steps and CFG 1.0 (6–8 steps above 1024Β²). Full-quality option: load the merged fp32 single file moss_image_sft_4step_v2.0_fp32.safetensors in Load Diffusion Model and skip the LoRA entirely (see ComfyUI below).

🐍 diffusers

Base bf16 transformer + this LoRA, release sampler, 4 steps, CFG 1. Note: the custom pipeline has no load_lora_weights β€” use the bundled apply_lora.py:

import torch
from diffusers import DiffusionPipeline
from apply_lora import apply_turbo_lora   # ships in this repo

pipe = DiffusionPipeline.from_pretrained(
    "akhaliq/MOSS-Image-SFT-4-steps",          # all-in-one: also loads from base repo
    custom_pipeline="pipeline_moss_image", trust_remote_code=True,
    torch_dtype={"default": torch.bfloat16, "vae": torch.float32},
).to("cuda")
apply_turbo_lora(pipe.transformer)             # fp32 LoRA, unmerged
image = pipe("A neon sign reading 'ζ·±ε€œι£Ÿε ‚' over a rainy door",
             num_inference_steps=4, guidance_scale=1.0,
             generator=torch.Generator("cpu").manual_seed(1234)).images[0]

Precision: keep the LoRA unmerged in fp32 β€” the distillation delta is smaller than bf16's rounding step. The fp32 LoRA applied unmerged on the bf16 base (via apply_lora.py) is the evaluated configuration; merging into bf16 degrades fine text first. For maximum quality use the merged fp32 transformer/ instead.

πŸ’» Single-file CLI

python inference.py --prompt "..." --steps 4 --out out.png

Resolution ↔ steps (measured, hires_probe/): the 4-step anchors cover ~4k latent tokens. Above that, give it more steps β€” same LoRA, no retrain:

Output Steps
≀1024Γ—1024 4
~1536 wide 6
2048Γ—2048 8

At 4 steps above 1024Β² the output turns hazy/washed-out; at 6–8 steps it is sharp (verified 2048Β² portraits and street scenes). A multi-resolution distillation for native 4-step-at-2048 is on the roadmap.

Single-file CLI: python inference.py --prompt "..." --steps 4 --out out.png

Files

  • lora.safetensors β€” the model. fp32 LoRA, rank 128 / alpha 128 on every block's proj.{q,k,v,o,ffn_up_gate,ffn_down} (kohya keys). Euler-native. Canonical name β€” always points at the latest release. Frozen versioned copies are also provided so you always know exactly which version you have: moss_image_sft_4step_v2.0.safetensors (identical to today's canonical file). Old releases stay in their checkpoint folders (checkpoint-update-* data-space, euler-update-* Euler).
  • transformer/ β€” merged fp32 transformer (LoRA baked in), for max quality with the release pipeline.
  • euler-update-{100..600}/ β€” v3 (Euler) training checkpoints, u600 = published.
  • checkpoint-update-{250,500,750,1000}/ β€” v1.x data-space checkpoints (archived; those need the data-space sampler and their bundled time_embedding/dataspace files β€” see checkpoint-update-400/).
  • inference.py, train_dmd.py, apply_lora.py β€” inference CLI, training script, and the diffusers LoRA loader helper.
  • comfyui/moss-image-4step-turbo.json β€” ready-to-run ComfyUI workflow.
  • moss_image_sft_4step_v2.0_fp32.safetensors β€” merged fp32 single file (LoRA baked in at full precision) for ComfyUI Load Diffusion Model.
  • Text encoder, tokenizer, VAE, scheduler, pipeline_moss_image.py β€” bundled from the base repo so this repo loads standalone.

ComfyUI

Ready-to-run workflow: comfyui/moss-image-4step-turbo.json β€” native ComfyUI loaders (no custom nodes): Load Diffusion Model = the Comfy-Org moss_image_sft_bf16.safetensors, LoraLoaderModelOnly = moss_image_sft_4step_v2.0.safetensors (strength 1.0), KSampler = euler / simple / 4 steps / CFG 1.0, CLIP type moss_image.

If output looks smudged/overcooked: you are almost certainly running the default MOSS-Image template settings (25–50 steps, CFG 2.5–3) with the distilled LoRA β€” set 4 steps and CFG 1.0 (6–8 steps above 1024Β², see the resolution table). A default template ignoring the LoRA (undistilled model at 4 steps) also produces mush; check the console for lora key not loaded.

For maximum ComfyUI quality use the merged fp32 single file moss_image_sft_4step_v2.0_fp32.safetensors in Load Diffusion Model and skip the LoRA entirely β€” standard LoRA patching casts the fp32 delta into bf16 weights, which is where fine text is lost (see Precision).

Head-to-head

The 4-step race β€” animated, same prompt + seed, live timers (lodestones lora_latest 8-step | this model 4-step | rapid-moss 4-step):

The 4-step race: fastest and the only clean numbers

This model finishes first (5.6 s vs 11.2 s) and is the only panel with all numbers correct β€” rapid-moss slips to "48%", lora_latest invents "AUUTERT". Full frames and the Shanghai-street race: launch/.

🎬 Launch video with voiceover (25 s): showcase/launch_video.mp4

Static strips, 4-way, same prompts + seeds (left β†’ right: this model (Euler, 4 steps) | v1.1 data-space 4-step | darask0 rapid-moss 4-step | lodestones lora_latest Euler 8-step):

Infographic: only this model and its v1.1 sibling get all numbers right

Shanghai neon street: all four correct on headline text; richness varies

JSON layout poster: all four render the layout

Scorecard: this model ties the best on headline text and menus, wins numeric fidelity outright (the infographic β€” both competitors garble secondary numbers), and is the only one that needs no custom sampler. darask0's rapid-moss still produces the liveliest street-scene compositions. All 8 strips: v3_final/.

Training

Method data-space DMD (arXiv 2610.12102) v1.x; Euler-native DMD v3
Teacher frozen MOSS-Image-SFT (bf16), CFG 3.0, negative branch skip-layer 22
Fake score base transformer (bf16) + fresh rank-128 LoRA, 1:1 update ratio
v1.0 1,000 updates from lodestones update-2600 warm start (data-space)
v1.1 +400 updates, signage-lexicon + 3,000 real user prompts (fixed small-English-text class)
v3 600 updates, Euler-native, warm-started from lora_latest; anchors t = 1000/910/717/24
Optimizer Adam β₁=0, grad clip 1.0, EMA 0.999
Cost ~$14 + ~$6 + ~$9 on 1Γ— A100-80GB

Citation

@misc{mossimagesft4steps2026,
  title = {MOSS-Image-SFT-4-steps: 4-step DMD distillation of MOSS-Image-SFT},
  author = {akhaliq},
  year = {2026},
  howpublished = {\url{https://huggingface.co/akhaliq/MOSS-Image-SFT-4-steps}}
}

Builds on MOSS-Image (Apache 2.0), lodestones' 8-step DMD, and Few-Step Generation via Data-Space Iteration.

Downloads last month
669
Safetensors
Model size
5B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for akhaliq/MOSS-Image-SFT-4-steps

Adapter
(14)
this model

Space using akhaliq/MOSS-Image-SFT-4-steps 1

Paper for akhaliq/MOSS-Image-SFT-4-steps