-
[2026-10-19] 📄 The MOSS-Image Technical Report is now available on arXiv. If you find our work useful, please support us with an upvote on Hugging Face Papers! 🤗
-
[2026-10-18] 🛠️ KohakuMossTrainer has been released, offering full fine-tuning and LyCORIS training (including LoRA) for MOSS-Image-Base and MOSS-Image-SFT. It features extensive optimizer support, mixed-precision training (BF16/FP16/FP8/MXFP8/INT8), multi-GPU training (DDP/FSDP/pipeline parallelism), optimized kernels, and CPU offloading, enabling adapter training with as little as 6GB VRAM. It supports Windows, Linux, NVIDIA GPUs (SM70–SM120), and Intel Arc GPUs. See the GitHub repository for details.
-
[2026-10-16] 🚀 MOSS-Image has day-0 support in SGLang, vLLM-Omni, and ComfyUI.
-
[2026-10-16] 🎉 We are introducing MOSS-Image-Base and MOSS-Image-SFT! Code and model weights are publicly available.
Our key highlights:
- 📐 Layout control: Control the placement of text and visual elements.
- ✍️ Strong text rendering: Generate clear, accurate text within images.
- 📜 Long-prompt support: Accept text prompts of up to 4K tokens.
- 🎨 Versatile visual styles: Create high-quality anime and photorealistic images.
- 🛠️ Easy to fine-tune: Adapt the base model to custom tasks and domains.
- ⚡ Compact and efficient: Efficient image generation with a 5B backbone.
- 🖥️ Heterogeneous GPU training: Trained on alternative GPU platforms.
-
DiffSynth-Studio now supports full fine-tuning and LoRA training for MOSS-Image-Base and MOSS-Image-SFT. See the training documentation and example scripts.
-
MOSS-Image-SFT-DeBand by MATLOWAI provides community LoRAs to reduce vertical color banding in MOSS-Image-SFT, together with ComfyUI preset workflows. See the model card for examples, settings, and the trade-offs between stripe reduction and changes to image details.
-
MOSS-Image-SFT-8-steps-dmd by lodestones is a community 8-step DMD distillation of MOSS-Image-SFT, with LoRA adapters for ComfyUI. See the model card for the latest checkpoints and usage recommendations.
-
MOSS-Image-FP16-fixed by KBlueLeaf provides FP16-compatible transformer weights for MOSS-Image-Base and MOSS-Image-SFT, using residual-stream rescaling to improve overflow headroom. Diffusers and ComfyUI formats are available; see the model card for loading instructions and adapter compatibility.
-
ComfyUI-Spectrum-MOSS by Rkkss adds Spectrum-style hidden-state forecasting to accelerate MOSS-Image sampling in ComfyUI, with manual and experimental adaptive nodes. See the repository for recommended sampling settings and examples.
Start with the English user guide or 中文用户指南 for recommended inference settings, prompt examples, layout input formats, and LoRA training guidance.
MOSS-Image is supported natively in ComfyUI. Update to ComfyUI master/nightly with MOSS-Image support and install its dependencies, then use the built-in loaders with ComfyUI-format weights. No MOSS-Image plugin is required for this workflow.
The repository plugin remains available for loading a local Hugging Face / Diffusers directory and for existing plugin workflows.
Installation and usage · HF loader plugin workflow
The MOSS-Image Prompt Enhancer turns image ideas into detailed captions or spatial Layout prompts. It is designed for GPT-6-family agents with local file and Python tools. The bundled script converts pixel-coordinate drafts into compact JSON with integer centered coordinates; it does not call an image-generation service.
Install the skill folder in your agent's skills
directory, then invoke $moss-image-prompt-enhancer with your image idea, desired
caption or Layout output, and any canvas dimensions. Paste the compiled result
into MOSS-Image's positive prompt; for Layout, use the same generation dimensions.
- News
- Community projects
- User guide
- ComfyUI
- Prompt enhancer skill
- Models
- Quick start
- Layout-to-image generation
- Showcase
- Citation
- License and acknowledgements
- Star History
| Model | Description |
|---|---|
| MOSS-Image-Base · ModelScope | Base text-to-image model |
| MOSS-Image-SFT · ModelScope | Fine-tuned from MOSS-Image-Base on curated data |
In this example, SFT produces clearer text grouping and a more organized whiteboard layout.
| MOSS-Image-Base | MOSS-Image-SFT |
|---|---|
![]() |
![]() |
git clone https://github.com/OpenMOSS/MOSS-Image.git
cd MOSS-Image
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtimport torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"OpenMOSS-Team/MOSS-Image-Base",
custom_pipeline="pipeline_moss_image",
trust_remote_code=True,
torch_dtype={"default": torch.bfloat16, "vae": torch.float32},
)
pipe.scheduler = type(pipe.scheduler).from_config(pipe.scheduler.config)
pipe.to("cuda")
image = pipe(
"A wide view of a refrigerator beside a kitchen counter with a fruit bowl. A small sticky note on the refrigerator door is handwritten in Chinese:“\n记得买牛奶和鸡蛋!\n牛奶两盒,鸡蛋一打。\n顺便带一袋面包。”",
height=1456,
width=1456,
num_inference_steps=50,
guidance_scale=3.0,
uncond_skip_layers=[22],
generator=torch.Generator("cpu").manual_seed(42),
).images[0]
image.save("refrigerator_note.png")pip install -e '.[ui]'
python gradio_app.py --model OpenMOSS-Team/MOSS-Image-Base| Setting | Default |
|---|---|
| Sampler | Flow-matching Euler |
| Steps | 50 |
| CFG | 3 |
| Shift | 5 |
| Layer skipping | Negative-branch skipping at layer 22 |
| Negative prompt (Python API) | Empty |
See the user guide for sampling and prompt recommendations.
Select Memory mode in Gradio's Advanced settings:
| Mode | Behavior |
|---|---|
| GPU resident | Keep the entire model on GPU |
| Component | Move model components between CPU and GPU as needed |
| Sequential · fallback | Lower memory use with slower inference |
If GPU memory is insufficient, select Sequential or reduce image size. Compile DiT is disabled by default and unavailable in Sequential mode.
MOSS-Image uses JSON layout inputs to control text placement and object arrangement in complex text-to-image compositions. The image below was generated by MOSS-Image using layout control.
Layouts can also support controlled editing and user-friendly layout tools. By editing text, element descriptions, and bounding boxes, users can adjust image content and composition in a structured way.
Paste the layout JSON into Gradio’s Prompt field to specify the scene, text,
objects, and their positions. The following example uses a summary/items layout for a 1024×1024
canvas. Save it as layout.json:
{
"summary": {
"meta": ["poster"],
"canvas": "single",
"caption": "A minimalist travel poster with a cream background, a blue mountain illustration, and the title EXPLORE at the top."
},
"items": [
{
"label": "text",
"caption": "Large dark-blue uppercase title centered at the top.",
"text": "EXPLORE",
"bbox": [-416, -384, -288, 384]
},
{
"label": "object",
"caption": "A flat blue mountain illustration in the lower center.",
"bbox": [-192, -288, 384, 288]
}
],
"bbox_coord_space": "abs_centralized",
"bbox_format": "yxyx"
}summary.captiondescribes the overall scene and style.itemsdescribes individual elements:label,caption, andbbox, withtextfor the words to render.bbox_format: "yxyx"specifies[y_min, x_min, y_max, x_max].bbox_coord_space: "abs_centralized"uses pixel coordinates relative to the canvas center. On a 1024×1024 canvas, each axis runs from −512 to +512; x increases to the right and y increases downward. For a canvas of width W and height H, subtract W/2 from ordinary x coordinates and H/2 from y coordinates.
Keep the coordinates consistent with the requested output dimensions. In Gradio,
paste the JSON into the prompt field and set the matching width and height. With
the Python API, pass json.dumps(layout, ensure_ascii=False) as the prompt string.
If you use MOSS-Image in your research, please cite our technical report:
@misc{ai2026mossimagetechnicalreport,
title={MOSS-Image Technical Report},
author={MOSI. AI},
year={2026},
eprint={2610.23374},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2610.23374},
}The standalone pipeline code is provided under the Apache License 2.0.
We thank the Diffusers, Qwen and FLUX teams.





