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

MOSS Storyboard Sampler

Eight panels in one run, already cut apart

By ZenHG·Created 7 days ago·Updated about 18 hours ago· 9
MOSS Storyboard Sampler
  • model
  • clip
  • vae
  • grid
  • panels
  • latent
  • spec
  • prompt_used
  • report
  • prompts_json
◄positive►
◄negative►
◄steps50►
◄cfg3.0►
◄sampler_nameeuler►
◄schedulersgm_uniform►
◄seed0►
◄denoise1.00►
◄spec►
◄panels8►
◄panel_aspect16:9►
◄panel_edge512►
◄canvas_aspectauto►
◄gutter8►
◄margin8►
◄initauto►
◄labelobject►
◄rebordertrue►
◄border_px0►
◄shave0►
◄mode整张►
◄sample_edge1024►

Making a comic with a diffusion model was never really a model problem. It's a geometry problem wearing a creative hat. The genre's most-cited write-up - a 72-page graphic novel that took three months of semi-full-time work - puts prompting at about 35% of the effort, the rest going to layout and manual correction. This node attacks that other 65%: give it a model and a script, get back a clean grid and the panels, aligned to the pixel.

What it actually does

You write a storyboard script: one global paragraph for characters and style, then [PANEL 1]: through [PANEL n]: for the shots. The node splits that into panels, converts each into a MOSS-native layout box (the same JSON the host's layout prompt node emits), encodes, samples, and hands back both the assembled grid and the crops.

Two ways to generate, and it matters which:

整张 (whole canvas) - one pass over the entire grid. Fast, good for feeling out a composition or running 8–9 panels.

逐格 (per panel) - each panel is sampled independently at its own canvas size, then assembled and re-bordered. Costs ~N× the time, buys two things. First, cross-panel consistency: whole-canvas mode spreads the global description thin across N regions and re-imagines the character in each, so hats change colour and faces drift. Per-panel, every sample reads the whole global paragraph again - the author's measured variance on a repeated red hat across four panels fell from 0.0036 to 0.00004. Second, resolution: sample_edge (default 1024) sets the sampling canvas per panel, decoupled from the finished panel size. Measured: 496 soft, 992 optimal, 1984 worse because composition loosens.

One detail that explains odd behaviour: the prompt cleaner strips multi-panel phrasing - "exactly 4 panels", "thin white borders" - before per-panel encoding, because otherwise the model draws four panels inside your single-panel box - it did, in testing, with one bbox.

The inputs you'll actually touch

Wire model from a UNETLoader, clip from a CLIPLoader, vae from a VAELoader, and type your script into positive.

That CLIPLoader type must be moss_image. Get it wrong and nothing errors - you just get the wrong embeddings and a picture that means something else. Most common silent failure in the MOSS stack.

steps and cfg come in two tiers that don't mix: official weights want 30–50 steps at cfg 3–5; with a 4-step distillation LoRA, 4–8 steps at cfg 1.0. Running 35 steps on a distilled LoRA isn't an error, it just wastes a minute and can hand you mush. The inverse gives you the black frame everyone posts about.

denoise stays at 1.0. There's no image input; lowering it truncates the sigma schedule and effectively runs fewer steps, and report prints nominal vs actual.

Optional spec beats everything: wire it in from the Layout node and every geometry widget here (panels, panel_aspect, panel_edge, canvas_aspect, gutter, margin) goes dead. Number-one wrong-shape complaint.

Outputs: grid, panels (a batch, row-major), latent, spec (feed it to Crop and Paste), prompt_used (what actually got encoded - in layout mode, the generated JSON; useful when a panel ignores you), and report. From the source: latent is the real sampled latent in whole-canvas mode (wire your own VAEDecode); in per-panel mode it comes back empty.

Install

Manager, search MOSS Storyboard. Or:

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

Restart; look for [MOSS SB] v0.2.2 in the log. No line, no pack.

The requirements outweigh the install: ComfyUI ≥ 0.42.0 (older hosts have no moss_image clip type - nodes appear, encoding silently misbehaves), moss_image_sft_bf16.safetensors in models/unet/, qwen3.5_9b_int8_convrot.safetensors in models/clip/, flux2-vae.safetensors in models/vae/. The pack pulls zero pip packages; requirements.txt is deliberately empty.

Where people get burned

Black output. Almost always the steps/cfg tier mismatch - read report first.

OOM at the VAE decode, or faint seams across your panels. Same cause: the host fell back to tiled decoding and the boundaries cut through your grid. Search the log for retrying with tiled VAE decoding. Fixes in ascending cost: git pull the host (older builds estimated decode VRAM at 4× reality), halve panel_edge (quarter the decode memory), drop 8 panels to 4. Note --fp32-vae silently disables the memory-saving path.

Panels populated but wrong. MOSS layout following is officially experimental - boxes are a strong suggestion, not a contract. One shot per [PANEL n], and check the segment count in report.

Per-panel mode refusing to run. It needs a [PANEL n] segment for every panel and errors rather than padding with blanks.

Start from examples/moss-storyboard-4panels-ui.json - pre-wired, grouped, sane defaults.

Categorymoss/storyboard

Inputs (25)

NameTypeDefaultDescription
modelMODEL【接线】UNETLoader 输出的 MOSS-Image 模型(可先过 LoRA)。
clipCLIP【接线】CLIPLoader,type 必须是 moss_image。 ⚠ 用错 type 会静默拿到错误嵌入,画面语义跑飞。
vaeVAE【接线】FLUX.2 VAE(moss 的 latent 空间就是它)。 解码精度由你用的 VAE 加载器决定,本节点不干预。 ⚠ 精度跑成 fp32 会让宿主把解码显存预估放大到 4 倍(不报错), 可能因此触发分块解码。要省显存请用 fp16 / bf16。
positiveSTRING【填什么】故事板稿:[STYLE] 全局描述 + 每格 [PANEL n]。 init=layout 时会自动转成 MOSS 布局 JSON 再编码。
negativeSTRING【可选,收在「高级」里】负面提示词。默认留空。 MOSS-Image-SFT 模型卡默认 cfg=3 > 1 ⇒ 填了会进计算图; 只有 cfg=1.0 时宿主才跳过负面分支(comfy/samplers.py 的 cfg1 优化)。
stepsINT501–200【填什么】采样步数。默认 50 = MOSS-Image-SFT 模型卡口径 (50 步 / cfg 3 / euler / shift 5 / SLG 负分支层 22)。 · 官方 Base 模型卡:同样 50 步 / cfg 3 / euler(CFG 范围 3–6); · 叠加 4 步蒸馏 LoRA:4–8 步 / cfg 1.0 —— 调高会破坏蒸馏效果。
cfgFLOAT3.00–30【填什么】引导强度。默认 3.0 = MOSS-Image-SFT 模型卡口径。 · 官方 Base 模型卡:cfg 3(官方给的适用范围 3–6); · 叠加 4 步蒸馏 LoRA:1.0。 ⚠ 1.0 时宿主跳过负面分支 ⇒ 负面提示词填了也不生效。
sampler_nameCOMBOeuler【填什么】默认 euler = MOSS-Image-SFT 模型卡口径。 ComfyUI 原生模板另用 er_sde / 25 步(Comfy-Org 的选择)。
schedulerCOMBOsgm_uniform【填什么】默认 sgm_uniform = OpenMOSS 官方 ComfyUI 插件工作流的配对;模型卡未指定 scheduler。 清单与宿主同源(comfy.samplers.SCHEDULER_NAMES):宿主装了新调度器这里自动出现。
seedINT00–4294967295【填什么】随机种。同种子同参数才可复现。
denoiseFLOAT1.000.05–1【留 1.0】降噪强度。1.0 = 从纯噪声开始完整生成,这是本包的正常用法。 ⚠ 这里没有图生图:调 <1 不会参考任何图,只会让宿主按 int(步数/降噪) 截断 sigma, 实际效果就是少跑几步(想省时间请直接调 steps,更直观)。
specoptSTRING【接线】接 MossStoryboardLayout 的 spec。接了就用它的几何,下面几何参数被忽略。
panelsoptINT81–12【未接 spec 时生效】格数。
panel_aspectoptCOMBO16:9【未接 spec 时生效】单格宽高比。
panel_edgeoptINT512128–2048【未接 spec 时生效】单格长边像素。
canvas_aspectoptCOMBOauto【未接 spec 时生效】画布宽高比目标。
gutteroptINT80–64【未接 spec 时生效】缝宽。
marginoptINT80–64【未接 spec 时生效】外边距。
initoptCOMBOauto【填什么】怎么送提示词: auto(默认)= 把每格描述转成布局框再送,纯生成; layout = 同上,显式写法; plain = 纯提示词,不加布局框:整张=整段原样送(等于普通 txt2img); 逐格=全局段(去掉多格措辞)+ 本格描述。 ⚠ auto/layout 会先对账:`[PANEL n]` 段数与全局段「N 个面板」 必须等于实际格数,不等直接报错(不自动补段);要绕过选 plain。 ⚠ 本包不做图生图:起点恒为空 latent。实测模板 latent 起点 (35 步/0.85 纯黑,12/0.6 与 4/0.5 残影)在 MOSS 上不成立, 所以这条通路已移除。想改已有图见 README「只改一格」。
labeloptCOMBOobject【进阶】布局框类型,同 Layout 节点。
reborderoptBOOLEANtrue【建议开】解码后按几何坐标重画笔直的宫格线。 关掉就只能指望模型自己把线画直——实测常歪、常有断口。
border_pxoptINT00–64【可留 0】复绘线宽。0 = 与缝宽一致(铺满整条缝)。
shaveoptINT00–64【可留 0】裁格时每格四边内缩像素。线已复绘在缝里,正常留 0。
modeoptCOMBO整张【填什么】怎么生成: 整张(默认)= 一次采样出整张宫格,快;跨格是「同一张脸」更稳。 逐格 = 每格独立采样再拼版,慢 N 倍;每格可给 4 倍像素, 服装 / 道具 / 文字更清楚,但每格各画一张脸。 ⚠ 别按「谁更一致」选:同一女性 ArcFace 实测整张 0.553 > 逐格 0.479。 一次成型用整张,要逐格返工用逐格。
sample_edgeoptINT1024256–4096【填什么】逐格模式下,**每格采样时**的画布长边像素。 1024 = 每格按 1024×N 采样,缩回最终格子后更清晰。 ⚠ 只在「逐格」模式生效;「整张」模式忽略它。 本机实测(4 格 / 16:9):496 → 偏糊,992 → 最优,1984 → 反而变松。 代价:显存与耗时按像素平方涨。

Outputs (7)

NameTypeDescription
gridIMAGE—
panelsIMAGE—
latentLATENT—
specSTRING—
prompt_usedSTRING—
reportSTRING—
prompts_jsonSTRING—