This is a GGUF quantized version of MOSS-Image-SFT by OpenMOSS, the 5.1B text-to-image transformer.
unsloth/MOSS-Image-SFT-GGUF uses Unsloth Dynamic 2.0 methodology: the UD- files are mixed precision, with each layer's type chosen from a measured sensitivity scan.
Only the transformer is in these files. The VAE and tokenizer are unchanged; take them from unsloth/MOSS-Image-SFT-FP8, which carries the upstream diffusers folders byte for byte. The text encoder runs from the stock unsloth/Qwen3.5-9B-GGUFQwen3.5-9B-Q8_0.gguf.
Recommended:MOSS-Image-SFT-UD-Q4_K_XL.gguf (3.42 GB) for most machines: LPIPS 0.213 against 0.294 for Q4_K_M. For output closer to bf16 use UD-Q5_K_XL (0.121) or UD-Q6_K_XL (0.106); Q8_0 (0.054) is the closest. On a CUDA GPU, Unsloth Studio defaults to the INT8-ConvRot file in unsloth/MOSS-Image-SFT-FP8 (LPIPS 0.058) instead.
Pick MOSS-Image-SFT in the Images tab and choose a GGUF file from this repo. Unsloth Studio runs MOSS-Image GGUFs with its bundled stable-diffusion.cpp engine and downloads the VAE, tokenizer and Qwen3.5-9B text encoder for you. Defaults: 1024x1024, 50 steps, CFG 3, shift 5.
LPIPS (alex, lower is better) and SSIM against the bf16 transformer: same prompt, seed, initial noise and bf16 text embeddings, 1024x1024, 50 steps, CFG 3, over 12 prompts (8 general prompts plus 4 held-out ones: a close-up portrait, a storefront sign with text, hands folding origami, a long scene description). A repeated bf16 render scores 0. MOSS-Image is sensitive to tiny numeric changes: changing a single bf16 rounding step in one layer already moves the renders by 0.041 LPIPS on average, so differences near that level are composition shifts rather than quality loss. The GGUF weights were dequantized into the reference pipeline for this table, so it measures only the weights.
Through stable-diffusion.cpp, scored against its own bf16 render on the 4 held-out prompts: Q8_0 0.109, UD-Q4_K_XL 0.188, Q4_K_M 0.347, UD-Q3_K_XL 0.336.
MOSS-Image-SFT is a supervised fine-tuned text-to-image model in the MOSS-Image family from OpenMOSS, derived from MOSS-Image-Base. It uses the same architecture and inference pipeline, supporting natural-language prompts, tag sequences, and JSON layouts for controlling text placement and object arrangement.
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:
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(
"OpenMOSS-Team/MOSS-Image-SFT",
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.
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.
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.