MOSS Image Prompt Enhancer T8
MOSS Image Prompt Enhancer T8 writes your prompt as JSON, not prose — and that's the whole trick
- reference_images
- provider_config
- 正向提示词 / positive_prompt
- 宽 / width
- 高 / height
- 实际格式 / resolved_format
- 可编辑草稿 / draft_json
- 诊断报告 / report_json
MOSS-Image doesn't just take a sentence and paint. Its prompt format has two native shapes: a Caption, ordinary descriptive prose, and a Layout - a summary plus a flat list of items, each carrying a pixel bounding box. Layout is where the interesting images live: controlled text placement, posters, panels, objects that sit where you said. It's also where you'd otherwise spend an evening hand-writing JSON and getting x1,y1,x2,y2 slightly wrong.
This node writes that JSON for you. Despite the "enhancer" name nothing here is vague: you give it a brief and a canvas size, an LLM drafts the native format, a pinned copy of the official MOSS compiler validates and rewrites the geometry, and you get a string for your text encoder. It generates no images and touches no sampling settings.
What you're wiring up
Six outputs. positive_prompt goes into the MOSS positive text-encode node - that's the one that matters. width and height come out as INTs so the same node can drive your empty latent, keeping the canvas the prompt was written for in sync with the canvas that gets sampled. Then resolved_format, draft_json (re-validatable source) and report_json (call counts, warnings, checks, no keys).
The controls a beginner actually sets: prompt, output_format (AUTO picks Caption or Layout and won't force everything into a poster), width/height (1024×1024 default, 8-pixel steps, 16–16384), and api_mode. That last one defaults to the 贞贞平价小屋 cloud route - a paid API, so running ComfyUI locally doesn't make this local. Local GGUF and the pack's Strata bridge are the offline options.
One thing to be blunt about: reference_images feeds the enhancement model only. Ten images max after batch expansion, and it fails loudly rather than silently dropping one - but that is not MOSS native image editing.
Why the compiler matters more than the model
Ask a chat model for pixel coordinates and it will confidently return boxes that are a little bit wrong. This design dodges that. The LLM writes only the draft in the official vocabulary - bbox_coord_space: "abs", bbox_format: "xyxy", global pixel coordinates, no percentages. The bundled compiler (pinned to OpenMOSS commit c1355e6, Apache-2.0, unmodified) does the arithmetic: subtract half the canvas, flip to yxyx, emit a single-line abs_centralized prompt with the canvas fields stripped. The model never guesses final coordinates.
Validation is strict: duplicate keys, unknown fields, NaN, truncated JSON, reversed or out-of-bounds boxes are all refused. Set locked_text and the compiled result has to contain those exact blocks - same characters, line breaks and repeat count - or it fails. That's the "enhancer invents detail you never asked for" problem answered with a hard stop instead of poisoned conditioning.
operation has two values, and the second is the sleeper feature. 仅校验编译 / Compile only compiles and checks a draft you paste into draft_json with no API key, no GGUF, no request at all - an offline validator for hand-written layouts. Generation allows max_corrections of 0 or 1, shared across format, geometry, text and length problems, so a hard-valid first draft is never lost to a failed fix-up. Hard failure stops execution and leaves the bad draft for you to inspect.
Install
Same pack as the H3/Seedance/Music enhancers - one clone, every node:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-prompt-enhancer-T8.git
Restart ComfyUI, then Ctrl+F5 in the browser. Updating an existing clone is git pull --ff-only in the plugin directory. Manager users can search MiniMax H3 / Seedance 2.0 / Music 3 Prompt Enhancer (T8) - the Manager name never mentions MOSS - or run comfy node install minimax-h3-seedance-music3-prompt-enhancer-t8.
No model downloads for the cloud route. It does want a recent ComfyUI (≥ 0.33), because the node uses the new node API and the V3 autogrow socket for references. Local GGUF needs weights in ComfyUI/models/LLM plus the pack's own installer: big, opt-in, never fetched behind your back.
Where people get burned
The node isn't in the menu. That's version, not installation. MOSS landed in pack 1.33.0 on 2026-10-17, and ComfyUI-Manager will cheerfully install an older Active registry build while the new one sits in review. "Installation successful," node doesn't exist. Update from GitHub, fully restart, and check there aren't two copies of the pack in custom_nodes.
Compile-only ignores your brief. The draft is the input; format, language and channel settings don't participate. And don't paste a compiled prompt back in - abs_centralized is detected and rejected as an already-finished product rather than re-centered into nonsense.
Your 8-pixel canvas isn't necessarily what gets sampled. 1256×1672 is accepted and preserved through generate, compile, save and reload, but downstream nodes may align it themselves: native Empty Flux 2 Latent rounds to multiples of 16, effectively 1248×1664. The node won't silently rescale, so check the real canvas before trusting a tight layout.
The 4096-token budget is unmeasured. MOSS's encoder keeps at most 4096 tokens of the wrapped prompt. This node doesn't measure it and reports unverified on purpose - characters aren't tokens, and long layout drafts can still be truncated upstream.
Weak local models. A small quantized model will emit JSON that doesn't survive the contract. That's a hard failure with the reason attached; use a stronger model rather than lowering the bar. And max_output_chars is soft - it won't cut a valid draft to hit your number. Passing structure and geometry checks means the prompt is usable, not that the typography or composition is good. For layout work, that gap is the whole experience.
Inputs (30)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| operation | COMBO | 生成 / Generate | 2 options: 生成 / Generate, 仅校验编译 / Compile only |
| output_format | COMBO | AUTO / 自动 | 3 options: AUTO / 自动, Caption / 自然描述, Layout / 空间排版 |
| width | INT | 102416–16384 | 8-pixel multiples are accepted without rounding; confirm downstream latent/image dimensions. |
| height | INT | 102416–16384 | 8-pixel multiples are accepted without rounding; confirm downstream latent/image dimensions. |
| output_language | COMBO | 按需求(默认英文)/ Auto | 3 options: 按需求(默认英文)/ Auto, English, 中文 |
| api_mode | COMBO | 贞贞平价小屋(推荐) | 5 options: 贞贞平价小屋(推荐), 贞贞的AI工坊(图片/视频), OpenAI兼容接口(备用), 本地 GGUF(llama.cpp / Qwen,离线), Strata 本地服务(桥接) |
| reference_imagesopt | COMFY_AUTOGROW_V3 | — | |
| api_keyopt | STRING | — | |
| provider_configopt | T8_LLM_PROVIDER_CONFIG | — | |
| locked_textopt | STRING | — | |
| max_output_charsopt | INT | 00–20000 | Unicode description characters, including punctuation/whitespace; excludes Layout visible text and JSON. Soft maximum, not Tokens; never truncates. 0 = automatic. |
| max_correctionsopt | INT | 10–1 | — |
| llm_max_tokensopt | INT | 16384256–65536 | — |
| draft_jsonopt | STRING | — | |
| ai_workshop_modelopt | COMBO | gemini-3.5-flash | 2 options: gemini-3.5-flash, Custom(自定义) |
| custom_modelopt | STRING | qwen/qwen3.8-flash-next | — |
| openai_base_urlopt | STRING | — | |
| seedopt | INT | 00–18446744073709550000 | — |
| local_modelopt | COMBO | Qwen3.8-27B-Q4_K_M.gguf | 1 options: Qwen3.8-27B-Q4_K_M.gguf |
| local_mmprojopt | COMBO | AUTO(自动匹配) | 2 options: AUTO(自动匹配), mmproj-F16.gguf |
| local_context_sizeopt | INT | 327688192–65536 | — |
| local_max_tokensopt | INT | 16384256–61440 | — |
| local_think_modeopt | COMBO | 关闭(推荐,速度优先) | 2 options: 关闭(推荐,速度优先), 开启(质量优先) |
| local_reasoning_effortopt | COMBO | medium | 3 options: low, medium, xhigh |
| local_unload_policyopt | COMBO | 执行后卸载(推荐) | 3 options: 执行后卸载(推荐), 保持驻留, 空闲10分钟后卸载 |
| local_comfy_memory_policyopt | COMBO | AUTO(显存不足时释放) | 2 options: AUTO(显存不足时释放), 不主动释放 ComfyUI 模型 |
| recovery_slotopt | STRING | — | |
| recovery_actionopt | STRING | normal | — |
| authoring_profileopt | COMBO | Classic / 原版 | 3 options: Classic / 原版, Comic / 漫画卡通, Fisher / 通用长版 |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| 正向提示词 / positive_prompt | STRING | — |
| 宽 / width | INT | — |
| 高 / height | INT | — |
| 实际格式 / resolved_format | STRING | — |
| 可编辑草稿 / draft_json | STRING | — |
| 诊断报告 / report_json | STRING | — |