Nodes/MOSS Storyboard & Layout/MOSS Storyboard Paste
ComfyUI Node

MOSS Storyboard Paste

Fix one panel, leave the other seven alone

By ZenHG·Created 7 days ago·Updated about 18 hours ago· 9
MOSS Storyboard Paste
  • grid
  • panel
  • grid
  • marked
  • report
◄index0►
◄shave0►
◄show_guidesfalse►
◄spec►
◄columns0►
◄rows0►

Here's the loop everyone falls into. You generate an eight-panel storyboard, seven panels are fine, one has a hand with six fingers. So you reroll. The seed changes, all eight panels change, and now you have a different set of problems. Forty minutes evaporate.

The fix is the same principle the KB's inpainting doc gives as the reason crop-and-composite still beats whole-image editing: bit-identical pixels everywhere you didn't touch. Crop the bad panel, edit that panel only, paste it back. Seven panels and every seam stay as they were.

What it does

The exact inverse of MossStoryboardCrop. Give it the grid, the corrected panel, and which cell it belongs in, and it writes the panel into that cell's content rectangle.

The care is all in the boundaries: it writes only the target cell's content area. Gutter and outer margins aren't repainted, not touched - the seams were drawn after decoding, and pasting shouldn't erase or duplicate them. Other cells copy through byte-for-byte.

The one hard rule: shave must match whatever you used when cropping. Inset 8 pixels on the way out and 0 on the way back and your content shifts 8 pixels - no error, no warning, just a panel sitting slightly proud of its box. Trust report over your eyes.

If the panel isn't the cell's exact size - your editor resized it, your inpainting node returned something else - it resamples rather than throwing. Convenient, and it breaks the bit-identical premise, so it says so in report. For a pixel-exact round trip: resize_edge=0 and target_aspect=keep on the crop side, matching shave on both.

The inputs and outputs

grid is the full storyboard - the Sampler's grid, or a previous Paste's output if you're chaining. panel is the single corrected cell; from Crop with index set, that's exactly one image and the safest source.

index is 0-based, row-major: left to right, top to bottom. Wire the Crop node's index output in and you physically cannot paste into the wrong cell, which is the whole point of that output existing.

shave - see above. Keep both sides equal, or both at 0.

show_guides is the debug switch: on, marked outlines the paste region in pure red so you can confirm which cell you're writing into. Off, marked is just the input grid.

Optional spec gives exact geometry. Without it, supply columns and rows, the image must divide evenly, and no-spec mode assumes zero gutter and margin - so it only lines up on a borderless grid.

Outputs are grid (the corrected sheet), marked, and report.

How to wire the real workflow

Crop (index = the bad panel) ──panel──→ your edit ──→ Paste
Crop ──index──────────────────────────────────────→ Paste
Sampler ──grid────────────────────────────────────→ Paste
Sampler ──spec────────────────────────────────────→ Paste / Crop

Two panels to fix? Chain two Paste nodes - first one's grid into the second's grid, each with its own cell. Three panels, three nodes. It composes.

For "your edit," anything goes - the pack doesn't care. To stay inside MOSS, the host ships a Text Encode MOSS-Image Edit node, and a community Moss-Image-Edit LoRA (about 285MB, into models/loras/Moss-Image-Edit/) is solid on colour, wardrobe, lighting and style. examples/moss-storyboard-4panels-edit.json wires the chain up. One warning from the author: don't use that path to drag one panel toward the look of the others. It's a single-panel touch-up tool - cross-panel consistency comes from per-panel sampling with a strong global description.

Install

Manager, search MOSS Storyboard. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ZenHG/ComfyUI-MOSS-Storyboard

Restart and check for [MOSS SB] v0.2.2 in the log. Zero pip dependencies - the pack's requirements.txt is intentionally empty so Manager ignores pip. Host floor is ComfyUI ≥ 0.42.0. Model files, none of which this node loads: moss_image_sft_bf16.safetensors in models/unet/, qwen3.5_9b_int8_convrot.safetensors in models/clip/, flux2-vae.safetensors in models/vae/. The edit LoRA isn't part of the pack and paste-back doesn't need it.

Where people get burned

The pasted panel sits a few pixels off. Mismatched shave. Both sides must agree; there's no diagnostic beyond a shifted image.

Everything shifted, not just the panel. You pasted into a grid that had been resized since generation. The spec describes the original geometry; resizing invalidates every coordinate.

"index out of range." You're pasting panel 8 into a 4-panel layout, or you hand-typed a 1-based number. It's 0-based; the last cell of an 8-panel sheet is 7.

A batch into panel. It expects exactly one image and errors on a batch. That's why the Crop index route is recommended - it makes the shape impossible to get wrong.

Categorymoss/storyboard

Inputs (8)

NameTypeDefaultDescription
gridIMAGE【接线】整张宫格图(Sampler 的 grid 输出,或上一级 Paste 的输出)。
panelIMAGE【接线】改好的那一格(单张)。接 Crop 只取一格后的输出最稳。
indexINT00–143【填什么 / 可接线】贴到第几格,**0 起、行主序**(从左到右、从上到下)。 接了 Crop 的 index 输出就以它为准,不用手打,也不会和裁的那格对不上。
shaveINT00–64【可留 0】必须与当初 Crop 的 shave 一致:裁时四边内缩 s 像素, 贴回也写在同一个内缩矩形里。不一致不会静默偏移 —— 尺寸对不上会 bicubic 重采样并写进 report,代价是画面变糊。
show_guidesBOOLEANfalse【调试】在 marked 输出上把贴回区域框成纯红,用来目检「贴进了哪一格」。
specoptSTRING【接线】接 Layout/Sampler 的 spec,贴回位置才与生成时逐像素一致。
columnsoptINT00–12【未接 spec 时必填】列数。填 0 且无 spec 会报错,不会瞎猜。
rowsoptINT00–12【未接 spec 时必填】行数。

Outputs (3)

NameTypeDescription
gridIMAGE—
markedIMAGE—
reportSTRING—