MOSS-Image settings: steps, CFG, shift, SLG and resolution
The official defaults, what each one does, and image sizes the model accepts. From the user guide and README.
| Setting | Official | ComfyUI template | Notes |
|---|---|---|---|
| Steps | 50 | 25 | Best results at 50 or more. 30 is a usable middle ground |
| CFG | 3.0 | 2.5 | Range 3–6. 3 is enough for long prompts; raise it for short ones |
| Shift | 5.0 | 5.0 | Model default |
| Sampler | Euler | er_sde, simple | The official plugin uses Euler / sgm_uniform |
| Skip-layer guidance | Skip layer 22 on the negative branch | Layer 22, 0 to 0.5 | Layers 22, 24 and 26 all help. Off looks more photographic but details can collapse |
| Negative prompt | Empty in the Python API | Empty | Suggested: nsfw, worst quality, bad anatomy, watermark, jpeg artifact |
| Prompt length | Up to 4,096 tokens | Long, detailed captions are what it was trained on | |
Skip-layer guidance, briefly
There are two variants. The default, “two-pass” SLG, skips one transformer layer (22, counting from 0) when computing the negative branch of CFG. Standard SLG instead runs at scale 3 between 1% and 100% of sampling. In ComfyUI the native SkipLayerGuidanceDiTSimple node does the first; to do the second, swap in SkipLayerGuidanceDiT with scale 3, start 0.01, end 1 and rescaling 0. Kijai notes SLG can overblow anime styles; try it off or try layer 24 or 26 there. Some official examples use layer 26.
Prompt formats
- Natural language, English or Chinese. English has the most training data.
- Tags, in this order: quality → score → meta → year → character → series → artist → general. Example:
best quality, highres, hatsune miku, vocaloid, @foo bar, 1girl, blue hair. The Gradio app prefillsbest quality, masterpiece. - Layout JSON, with boxes for text and objects. Build one in the layout builder.
- Mixed: natural language and structured input can be combined.
For text in the image, put it in quotes and break lines yourself with real newlines or \n; the model wraps text on its own, but not always where you want. See the chalkboard example.
Resolution
Aim for 1, 1.5 or 2 megapixels. The model stretches from 0.25 MP (512×512) to about 4 MP. Any aspect ratio works, but width and height must both be multiples of 16, or the pipeline raises an error.
| Ratio | 1 MP | 1.5 MP | 2 MP |
|---|---|---|---|
| 1:1 | 992×992 | 1232×1232 | 1408×1408 |
| 4:3 | 1152×864 | 1408×1056 | 1632×1232 |
| 3:2 | 1232×816 | 1504×992 | 1728×1152 |
| 16:9 | 1328×752 | 1632×912 | 1888×1056 |
| 21:9 | 1520×656 | 1872×800 | 2160×928 |
| 3:4 | 864×1152 | 1056×1408 | 1232×1632 |
| 2:3 | 816×1232 | 992×1504 | 1152×1728 |
| 9:16 | 752×1328 | 912×1632 | 1056×1888 |
Rounded to the nearest multiple of 16 on each side.
Memory modes in the Gradio app
GPU resident keeps everything on the card; Component moves parts between CPU and GPU as needed; Sequential uses the least memory and is the slowest. Out of memory: choose Sequential or lower the size. Compile DiT is off by default and unavailable in Sequential.