/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
diffusers
Опубликована
16 окт 2026

MOSS-Image-Base

Генерация изображенийТекст → изображение3 профессии

Базовая модель OpenMOSS для генерации изображений по текстовым запросам и структурированным JSON-описаниям компоновки.

231скачиваний за 30 дней0лайковвеса обновлены19 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MOSS-Image-Base — базовая модель генерации изображений по тексту из семейства MOSS-Image, разработанная OpenMOSS. Этот репозиторий — зеркало OpenMOSS-Team/MOSS-Image-Base для использования с SD.Next; компоненты модели и конвейер diffusers сохранены без изменений. Модель принимает обычные текстовые запросы, последовательности тегов и JSON-описания компоновки сцены.

Модель предназначена для генерации изображений с управлением расположением объектов и текста: JSON-разметка задаёт сцену, элементы и их координаты. Для генерации используются архитектура Transformer и конвейер MOSSImagePipeline; README указывает настройки по умолчанию — 50 шагов сэмплирования и CFG 3. Для запуска нужны Python 3.10+, совместимая с CUDA видеокарта NVIDIA и подходящие версии PyTorch и diffusers. Поддерживаются английский и китайский языки. Лицензия — Apache License 2.0.

Сценарии применения

  • генерация изображений по текстовому описанию
  • создание сцен с заданным расположением объектов
  • размещение текста в изображении по структурированной разметке
  • создание изображений из JSON-макета
  • управляемое редактирование компоновки сцены

Ограничения

Для запуска требуется CUDA-совместимая видеокарта NVIDIA и установленный программный стек Python, PyTorch и diffusers. Для API размеры изображения должны быть положительными числами, кратными 16.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MOSS-Image-Base (SD.Next Mirror)

Mirror of OpenMOSS-Team/MOSS-Image-Base at revision 5f40f07a, kept for use with SD.Next. Please find the original repository here.

  • Transformer, VAE, text encoder, tokenizer, scheduler and the bundled pipeline_moss_image.py are unchanged from the original repository.
  • License: Apache License 2.0 (see LICENSE).

Loads in SD.Next from the Models reference list, or in diffusers with the bundled pipeline_moss_image custom pipeline.


MOSS-Image-Base

MOSS-Image-Base and MOSS-Image-SFT

MOSS-Image-Base is the base text-to-image model in the MOSS-Image family from OpenMOSS. It supports natural-language prompts, tag sequences, and JSON layouts for controlling text placement and object arrangement.

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

Use Python 3.10 or later and an NVIDIA GPU with CUDA support. Install a PyTorch 2.9 or later build compatible with your CUDA environment, then install:

pip install "diffusers>=0.38" "transformers>=5.3" "accelerate>=1.10" "safetensors>=0.6" "Pillow>=10"
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")

prompt = '''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:
"记得买牛奶和鸡蛋!
牛奶两盒,鸡蛋一打。
顺便带一袋面包。"'''

image = pipe(
    prompt,
    height=1024,
    width=1024,
    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")

The model and custom pipeline code are downloaded and cached automatically. You can also pass a complete local model directory to from_pretrained. The transformer and text encoder use bfloat16; the VAE and initial noise use float32. The bundled VAE uses the FLUX.2 small decoder.

For the Gradio interface, CPU offload, and compilation options, follow the project quick start. For ComfyUI, search for MOSS-Image in ComfyUI Manager to install the native plugin. Integration into the official ComfyUI repository is in progress. See the installation and usage guide and example workflow.

Sampling settings

SettingDefault
SamplerFlow-matching Euler
Steps50
CFG3
Shift5
Layer skippingNegative branch, layer index 22 (zero-based)
Negative promptEmpty

The default guidance uses two transformer forwards per step. Pass uncond_skip_layers=[] to disable negative-branch skipping, or set negative_prompt to provide a negative prompt. Python API image dimensions must be positive multiples of 16.

See the user guide for resolution, sampling, prompt, and LoRA training recommendations.

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.

Layout-to-image generation

Pass a JSON layout as the prompt to describe the scene, rendered text, objects, and their positions. Layouts use summary.caption and items, with bbox_format: "yxyx" and bbox_coord_space: "abs_centralized".

With the Python API, serialize the layout using json.dumps(layout, ensure_ascii=False) and pass it to pipe. In Gradio, paste the JSON into the Prompt field and set the matching image dimensions. See the layout format and example.

Layouts can also support controlled editing and user-friendly layout tools. Edit text, element descriptions, and bounding boxes to adjust image content and composition in a structured way.

Layout control

Showcase

Examples overview

Examples overview 2

Citation

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

License and acknowledgements

The model weights and bundled inference code are released under the Apache License, Version 2.0.

We thank the Diffusers, Qwen, and FLUX teams.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · diffusers

Нельзя запустить

Пайплайн MOSSImagePipeline не входит в diffusers 0.41.0.dev0: нужен custom_pipeline.

Ревизия весов
632d2d2

0 моделей