Preview Panel Layout
Preview a page layout before you commit to building panels
- layout
Preview Panel Layout is the cheapest feedback loop in this pack. It takes an abstract layout and draws it so you can actually see what you're working with - before you've chosen a canvas, margins, or generated a single panel. For the random/mutate workflow this is the node you stare at while hunting for a good page structure.
It's a close cousin of Save Panel Layout - it literally reuses the same rendering code - but aimed at eyeballing rather than archiving. Where Save writes a permanent PNG to your output folder with the layout embedded as metadata, Preview just renders to ComfyUI's temp/preview area. Same picture: panels filled with numbered stamps (the panel order that the cut sequence implies, which the pack treats as the reading order), and the compact cut-tree code printed along the bottom so you can read the structure at a glance.
The inputs are deliberately minimal:
- layout - the PANEL_LAYOUT you want to inspect.
- draw_as - the left-to-right / right-to-left switch, defaulting to LTR. It only affects how the preview is drawn; the underlying data is untouched, which the author's tooltip spells out so you don't go hunting for a data flip that isn't there.
There are no outputs, and the node is marked as an output node (terminal). That's fine - this node's job is to be the last thing on the canvas for a branch you're still exploring.
Two things worth knowing about what you're seeing. First, the preview is drawn without margins and without any panel adjustments - it's the raw cut tree resolved onto a page. If the layout feels cramped or airy here, that's a property of the structure itself, and it'll carry into the real build. Second, because the render goes through matplotlib (the pack's rendering workhorse), preview images are drawn to fit; they're not pixel-accurate to any canvas you have in mind. It's a shape check, not a size check.
Where it slots into the workflow: Random/Grid generator → Preview Panel Layout → like it? → Build Layout Panels with your real canvas and margin. Don't like it? Step the seed. The pattern you'll settle into is a small branch with the preview as the sink, so you can evaluate pages without committing to panel generation each time.
Installing
Part of comfyui-panels by bmad4ever. Via ComfyUI Manager (search "comfyui-panels") and restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_panels
Deps are shapely, matplotlib, opencv-python - no models, no GPU. Watch the pinned shapely version if another pack fights you at import time.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| layout | PANEL_LAYOUT | — | |
| draw_as | BOOLEAN | false | Flips the layout drawn on the stored image but the stored data is exactly the same. |
Outputs (0)
No outputs