OpenMOSS/MOSS-Image

Official repository for MOSS-Image, a 5B-parameter base DiT model with high-quality text rendering, layout generation, and efficient fine-tuning.

Python

238

7 commits

updated Oct 16, 2026

See the code

See what people are saying

SourceMessageScoreDate

Hey guys! I'm one of the core developers of MOSS-Image. AMA! (r/StableDiffusion)

Hey r/StableDiffusion! I'm one of the core developers of **MOSS-Image**, the 5B DiT image generation model we just open-sourced! I've noticed quite a few discussions about MOSS-Image here already. It's been really exciting to see the community experimenting with the model, and I really appreciate…

23

Oct 17, 2026

MOSS-Image (5B, Apache 2.0) on a 12 GB RTX 3060: INT8 quant + lodestones' 8-step DMD turbo in ComfyUI - 35 hard prompts, one seed, no cherry-picking (r/StableDiffusion)

Tested the new [MOSS-Image](https://github.com/OpenMOSS/MOSS-Image) (5B single-stream DiT, Qwen3.5-9B text encoder, FLUX.2 VAE, Apache 2.0) on a plain RTX 3060 12 GB / 16 GB RAM with 35 deliberately hard prompts: dense on-image text in English/Chinese/Japanese, accents, exact counts, attribute…

21

Oct 16, 2026

Here we go again. MOSS-Image (r/StableDiffusion)

[https://openmoss.ai/MOSS-Image/](https://openmoss.ai/MOSS-Image/) [https://huggingface.co/OpenMOSS-Team/MOSS-Image-SFT](https://huggingface.co/OpenMOSS-Team/MOSS-Image-SFT) [https://huggingface.co/OpenMOSS-Team/MOSS-Image-Base](https://huggingface.co/OpenMOSS-Team/MOSS-Image-Base)…

48

Oct 16, 2026

README

MOSS-Image MOSS-Image

Hugging Face · MOSS-Image-Base   Hugging Face · MOSS-Image-SFT   ModelScope · MOSS-Image-Base   ModelScope · MOSS-Image-SFT   Hugging Face Spaces · Demo   Follow OpenMOSS on X   MOSS-Image QQ 交流群:755535143   MOSS-Builders Feishu Community   Homepage   Technical Report

English   |   简体中文

News

  • [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.

User guide

Start with the English user guide or 中文用户指南 for recommended inference settings, prompt examples, layout input formats, and LoRA training guidance.

ComfyUI

This repository provides a native MOSS-Image plugin for ComfyUI.

Search for MOSS-Image in ComfyUI Manager to install the plugin. We are actively working toward integration into the official ComfyUI repository.

Installation and usage · Example workflow

Prompt enhancer skill

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.

MOSS-Image-Base and MOSS-Image-SFT

Contents

🤗 Models

ModelDescription
MOSS-Image-Base · ModelScopeBase text-to-image model
MOSS-Image-SFT · ModelScopeFine-tuned from MOSS-Image-Base on curated data

Base vs. SFT

In this example, SFT produces clearer text grouping and a more organized whiteboard layout.

MOSS-Image-BaseMOSS-Image-SFT
MOSS-Image-BaseMOSS-Image-SFT

🚀 Quick start

🛠️ Installation

git clone https://github.com/OpenMOSS/MOSS-Image.git
cd MOSS-Image
python -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

🐍 Python

import 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")

🎨 Gradio

pip install -e '.[ui]'
python gradio_app.py --model OpenMOSS-Team/MOSS-Image-Base

🎛️ Sampling settings

SettingDefault
SamplerFlow-matching Euler
Steps50
CFG3
Shift5
Layer skippingNegative-branch skipping at layer 22
Negative prompt (Python API)Empty

See the user guide for sampling and prompt recommendations.

⚡ Memory and performance

Select Memory mode in Gradio's Advanced settings:

ModeBehavior
GPU residentKeep the entire model on GPU
ComponentMove model components between CPU and GPU as needed
Sequential · fallbackLower 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.

📐 Layout-to-image generation

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.

Layout bounding boxes

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.caption describes the overall scene and style.
  • items describes individual elements: label, caption, and bbox, with text for 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.

🖼️ Showcases

Examples overview

Examples overview 2

📝 Citation

If you use MOSS-Image in your research, please cite this repository:

@misc{mossimage2026,
  title = {MOSS-Image},
  author = {{OpenMOSS Team}},
  year = {2026},
  howpublished = {\url{https://github.com/OpenMOSS/MOSS-Image}}
}

📄 License and acknowledgements

The standalone pipeline code is provided under the Apache License 2.0.

We thank the Diffusers, Qwen and FLUX teams.

controllable-generation
foundation-models
image-generation
text-rendering
text-to-image

OpenMOSS/MOSS-Image

Official repository for MOSS-Image, a 5B-parameter base DiT model with high-quality text rendering, layout generation, and efficient fine-tuning.

Python

238

7 commits

updated Oct 16, 2026

See the code

See what people are saying

SourceMessageScoreDate

Hey guys! I'm one of the core developers of MOSS-Image. AMA! (r/StableDiffusion)

Hey r/StableDiffusion! I'm one of the core developers of **MOSS-Image**, the 5B DiT image generation model we just open-sourced! I've noticed quite a few discussions about MOSS-Image here already. It's been really exciting to see the community experimenting with the model, and I really appreciate…

23

Oct 17, 2026

MOSS-Image (5B, Apache 2.0) on a 12 GB RTX 3060: INT8 quant + lodestones' 8-step DMD turbo in ComfyUI - 35 hard prompts, one seed, no cherry-picking (r/StableDiffusion)

Tested the new [MOSS-Image](https://github.com/OpenMOSS/MOSS-Image) (5B single-stream DiT, Qwen3.5-9B text encoder, FLUX.2 VAE, Apache 2.0) on a plain RTX 3060 12 GB / 16 GB RAM with 35 deliberately hard prompts: dense on-image text in English/Chinese/Japanese, accents, exact counts, attribute…

21

Oct 16, 2026

Here we go again. MOSS-Image (r/StableDiffusion)

[https://openmoss.ai/MOSS-Image/](https://openmoss.ai/MOSS-Image/) [https://huggingface.co/OpenMOSS-Team/MOSS-Image-SFT](https://huggingface.co/OpenMOSS-Team/MOSS-Image-SFT) [https://huggingface.co/OpenMOSS-Team/MOSS-Image-Base](https://huggingface.co/OpenMOSS-Team/MOSS-Image-Base)…

48

Oct 16, 2026

README

MOSS-Image MOSS-Image

Hugging Face · MOSS-Image-Base   Hugging Face · MOSS-Image-SFT   ModelScope · MOSS-Image-Base   ModelScope · MOSS-Image-SFT   Hugging Face Spaces · Demo   Follow OpenMOSS on X   MOSS-Image QQ 交流群:755535143   MOSS-Builders Feishu Community   Homepage   Technical Report

English   |   简体中文

News

  • [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.

User guide

Start with the English user guide or 中文用户指南 for recommended inference settings, prompt examples, layout input formats, and LoRA training guidance.

ComfyUI

This repository provides a native MOSS-Image plugin for ComfyUI.

Search for MOSS-Image in ComfyUI Manager to install the plugin. We are actively working toward integration into the official ComfyUI repository.

Installation and usage · Example workflow

Prompt enhancer skill

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.

MOSS-Image-Base and MOSS-Image-SFT

Contents

🤗 Models

ModelDescription
MOSS-Image-Base · ModelScopeBase text-to-image model
MOSS-Image-SFT · ModelScopeFine-tuned from MOSS-Image-Base on curated data

Base vs. SFT

In this example, SFT produces clearer text grouping and a more organized whiteboard layout.

MOSS-Image-BaseMOSS-Image-SFT
MOSS-Image-BaseMOSS-Image-SFT

🚀 Quick start

🛠️ Installation

git clone https://github.com/OpenMOSS/MOSS-Image.git
cd MOSS-Image
python -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

🐍 Python

import 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")

🎨 Gradio

pip install -e '.[ui]'
python gradio_app.py --model OpenMOSS-Team/MOSS-Image-Base

🎛️ Sampling settings

SettingDefault
SamplerFlow-matching Euler
Steps50
CFG3
Shift5
Layer skippingNegative-branch skipping at layer 22
Negative prompt (Python API)Empty

See the user guide for sampling and prompt recommendations.

⚡ Memory and performance

Select Memory mode in Gradio's Advanced settings:

ModeBehavior
GPU residentKeep the entire model on GPU
ComponentMove model components between CPU and GPU as needed
Sequential · fallbackLower 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.

📐 Layout-to-image generation

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.

Layout bounding boxes

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.caption describes the overall scene and style.
  • items describes individual elements: label, caption, and bbox, with text for 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.

🖼️ Showcases

Examples overview

Examples overview 2

📝 Citation

If you use MOSS-Image in your research, please cite this repository:

@misc{mossimage2026,
  title = {MOSS-Image},
  author = {{OpenMOSS Team}},
  year = {2026},
  howpublished = {\url{https://github.com/OpenMOSS/MOSS-Image}}
}

📄 License and acknowledgements

The standalone pipeline code is provided under the Apache License 2.0.

We thank the Diffusers, Qwen and FLUX teams.

controllable-generation
foundation-models
image-generation
text-rendering
text-to-image

Significant stargazers

Canlin Guo

75 followers · starred Oct 2026

Seunghyun Ji

21 followers · starred Oct 2026

Qinyuan Cheng

143 followers · starred Oct 2026

Alexander Brown

47 followers · starred Oct 2026