MOSS-Image SFT
4-Step Distillation LoRA — 4-Step LoRA for Fast Generation
2 min readupdated
This model is a LoRA (a small add-on for a base model) for OpenMOSS-Team/MOSS-Image-SFT that generates images in just 4 steps instead of the original 50. It cuts GPU time by about 14x while delivering near-teacher quality results with detailed textures. The model was trained on 15,000 examples and supports 12 resolutions up to 1824x1024. This new release is useful for ComfyUI users and Python developers looking to significantly speed up image generation without losing detail.
Key features
- 4 steps at CFG 1 — just 4 model calls instead of 100 for the base version (50 steps with two calls each at CFG 3).
- 14x less GPU time — significantly speeds up image rendering on the same hardware setup.
- More fine details — preserves the tone and style of the original model while rendering textures 1.22x more detailed.
- Accurate text — successfully handles generating words and labels written within images.
What you can do
- Python generation — integrate the LoRA using the diffusers library to quickly create images from text prompts.
- Work in ComfyUI — use ready-to-go workflows (text-to-image, editing, layouts) with a special file for the standard loader.
- Create posters and signs — generate images with clear text, menus, and labels.
Example
import torch
import torch.nn.functional as F
from diffusers import DiffusionPipeline
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
pipe = DiffusionPipeline.from_pretrained(
"OpenMOSS-Team/MOSS-Image-SFT",
custom_pipeline="pipeline_moss_image",
trust_remote_code=True,
torch_dtype=dict(default=torch.bfloat16, vae=torch.float32),
)
pipe.to("cuda")
image = pipe(
"A snow leopard walking along a rocky ridge",
height=1024,
width=1024,
num_inference_steps=4,
guidance_scale=1.0,
).images[0]
image.save("moss_4step.png")
Read more
DetailsMethod: eDMD + LADD (distribution distillation with endpoint critic).
Hardware: trained on a single NVIDIA B300 for ~30 hours, peak memory usage 196 GB.
Limitations: at high resolutions crowds may look uniform, and dark scenes turn out slightly brighter than the originals.










Comments