Nodes/Storyboard Layout & BBox Engine/Storyboard Preview Renderer
ComfyUI Node

Storyboard Preview Renderer

See your boxes before you render a single pixel

By SurrealByDesign·Created 3 months ago·Updated 3 months ago· 1
Storyboard Preview Renderer
    • preview
    bbox_json
    shot_json
    width768
    height432

    "Should I render this?" is the question this node answers, and it answers it in about a millisecond instead of a full diffusion pass. Feed it the bbox_json from the BBox Generator and it draws a plain frame with one labeled rectangle per subject - the kind of diagram a director scribbles before anyone touches a camera. It's not an image generator and never pretends to be; the whole point is cheap, readable feedback on placement.

    What it draws and how

    The mechanism is delightfully simple, and you can see it in the source: it takes each normalized box, scales it to your chosen pixel dimensions, and draws it as a colored rectangle with the subject's name as a text label. Subjects cycle through a fixed eight-color palette - you'll get a different color for each subject in the shot. There's a thin gray frame border, a near-white background, and if you provide a title it goes in the bottom corner.

    The inputs, in order of how often you'll touch them:

    • bbox_json (required) - the box map from the BBox Generator.
    • shot_json (optional) - pass the shot record through and the node uses its shot_type as the title label in the corner. Nice for keeping track of which shot you're looking at.
    • width (default 768) and height (default 432) - the preview resolution. Range is 64–4096. The 768×432 default is exactly a 16:9 frame, which matches the pack's default aspect.

    The output is preview, a proper ComfyUI IMAGE tensor. That's the useful part: because it's a real IMAGE, you can wire it straight into a Save Image or Preview Image node, or into anything downstream that eats images. You're not stuck squinting at a text widget.

    Why you'd reach for it

    The obvious use is the sanity check: run the four-node chain, glance at the preview, and catch the mistake where your wide composition put the cathedral off in the corner before you spend two minutes generating an image around a bad layout. But because it emits a real IMAGE, it also works as a cheap diagram generator - save the preview, drop it in a storyboard doc, use it to communicate a shot plan to someone (or to a different tool) without sharing raw JSON.

    Install and gotchas

    Installs with the rest of the pack - either clone it into ComfyUI/custom_nodes or grab it via ComfyUI Manager ("Storyboard Layout"), then restart. No extra dependencies; the rendering uses Pillow and numpy that ComfyUI already ships.

    The classic mistakes here are mostly about feeding it the wrong JSON:

    • Feeding it layout_json instead of bbox_json. The Preview Renderer wants actual boxes, not the plan. The BBox Generator is the node that produces them.
    • "expected bbox JSON, got empty input" - nothing connected, or the upstream BBox Generator errored. Check the chain.
    • The preview looks too small? Default is 768×432, which is plenty for checking placement. Crank width/height up if you want a bigger diagram, but there's no point rendering a 4096×4096 diagram of a few rectangles.
    • Can't change a subject's color. The palette is fixed and deterministic - subject order determines color, not any per-subject setting. It's a preview aid, not a styling tool.

    One honest caveat: it draws rectangles and labels, full stop. Don't expect silhouette art or a recognizable thumbnails of your actual subjects - you're checking where things sit, not what they look like. For that, you render.

    Categorystoryboard/layout

    Inputs (4)

    NameTypeDefaultDescription
    bbox_jsonSTRING
    shot_jsonoptSTRING
    widthoptINT76864–4096
    heightoptINT43264–4096

    Outputs (1)

    NameTypeDescription
    previewIMAGE