载入 MOSS JSON · Load MOSS JSON
Paste Raw MOSS JSON Into ComfyUI the Old-Fashioned Way
- moss_json
- width
- height
- resolution_json
MOSS-Image doesn't take a paragraph. It takes a JSON document - a summary plus a list of items, each with a box and a description - and renders within those boxes. Which means the shortest path from "I have some layout JSON" to "I have an image" is a node that just hands the JSON and a resolution to the sampler. SodaLoadMossJSON is that node.
It's the pack's legacy entry point, and the README is honest about it: kept for old workflows and pasted text. If you're importing a file you should be using 导入分镜 (SodaLoadStoryboard) instead, because that one previews the layout, warns you about missing character cards, and gives you the compiled prompt to inspect. This one is the pipe.
How it works
source is a multiline string and it's smarter than it looks. If it's blank, the node falls back to filename - an uploaded .moss.json in ComfyUI's input area. If it starts with {, it's parsed as inline JSON text. Anything else is treated as a filesystem path and read as UTF-8. So you can paste a blob from an AI chat, point it at a file, or upload one, and all three work.
Then it validates. A valid MOSS layout needs a summary object and an items array; anything else throws rather than letting a malformed prompt reach the sampler and produce an image with no relationship to your intent. It re-serializes the JSON compactly and outputs it.
width and height are yours to set here, defaults 1024×1536, minimum 16, step 16. They come out as integers, and resolution_json emits the {"version":1,"width":W,"height":H} form that resolution nodes in the MOSS workflow accept. This is the one place the pack doesn't have a file to infer dimensions from, so it doesn't pretend: you tell it.
The clever bit is caching. Its change detection hashes the JSON source, the uploaded file, and the resolution together, so editing the pasted text re-triggers the graph while changing an unrelated widget doesn't. If you've ever had a node ignore your prompt edit because ComfyUI decided nothing upstream had changed, you'll appreciate this.
Outputs and wiring
Four outputs. moss_json goes into the MOSS sampler's JSON text input - directly, not wrapped in extra quotes, which is the mistake people make when they're thinking of it as "a prompt." width and height feed the latent size integers, and resolution_json goes into a resolution node if yours wants the structured form (you'll need to right-click that widget and convert it to an input first).
One thing this node can't do: tell you whether the JSON is any good. There's no preview, no layout drawing, no warning list. If your boxes are normalized coordinates the width/height you pick shapes how they land, and the only feedback is the image that comes out.
Install
Pack install, plus the separately published core library - the JSON validation and the resolution helper both live there.
cd ComfyUI/custom_nodes
git clone https://github.com/cOkieeman/ComfyUI-Soda-Storyboard
cd ComfyUI-Soda-Storyboard && python -m pip install --upgrade soda-storyboard
Or Manager → search Soda Storyboard (comfyui-soda-storyboard). Windows portable:
.\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\ComfyUI-Soda-Storyboard\requirements.txt
And the models, which are the expensive part: the MOSS-Image SFT checkpoint into models/diffusion_models, the text encoder (qwen3.5_9b_w4a8_gptq.safetensors, encoder type moss_image) into models/text_encoders, flux2-vae.safetensors into models/vae. Subfolders are fine - just reselect in the loaders.
Where people get burned
"请先导入 MOSS JSON 或粘贴文本" means both source and filename are empty. "MOSS JSON 必须包含 summary 对象和 items 数组" means the JSON parsed but isn't a MOSS layout - usually you pasted a storyboard bundle here, which has project, page and characters instead. Wrong node, different file.
Dimensions must be multiples of 16. Step 16 is enforced on the widget, but if you drive width/height from another node's output, you can absolutely hand it 1000 and find the decoder gave you 992 of usable canvas - the pack blocks that on the import path and warns about it in the docs for a reason.
If you're on this node because you're following an older tutorial, consider switching: swapping it for 导入分镜 costs you five minutes and buys you a preview of the layout before you burn 50 steps on it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| source | STRING | — | |
| width | INT | 1024 | — |
| height | INT | 1536 | — |
| filenameopt | COMBO | 上传或拖入 .moss.json | 1 options: 上传或拖入 .moss.json |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| moss_json | STRING | — |
| width | INT | — |
| height | INT | — |
| resolution_json | STRING | — |