Canvas Panel
The boring rectangle every panel workflow secretly starts with
- POLYGON
Boring nodes do the heavy lifting, and this is the most boring node in comfyui-panels - it literally produces a rectangle. But it's also the first node in almost every workflow this pack ships, because every other node that deals with panels needs a "canvas" to anchor to. If you've ever loaded a panel workflow and seen a single box-shaped polygon feeding half the graph, this is what made it.
Canvas Panel just takes a width and a height and outputs a rectangle polygon from (0, 0) to (width, height). That rectangle is the page. It's the reference frame for Build Layout Panels (which cuts the page into panels), the size reference for Panel to Mask (which rasterizes panels at canvas resolution), and the bounds for Draw Panels Edges (which draws panel borders on it).
How it works
There's no magic here - the source is a single call to shapely's box(0, 0, width, height), returned as a POLYGON. What you should pay attention to is the meaning: every other node treats this rectangle as the coordinate space, so its size determines the resolution of every mask and image you generate downstream. Change the canvas and the whole layout re-proportions with it.
The inputs that matter
width- default 2480, range 0–5000.height- default 3508, range 0–5000.
Those defaults are portrait A4 at 300 DPI, which tells you what the author was thinking: print-style comic pages. If you're making webtoon strips or landscape pages, you'll change them. There's no other input and one POLYGON output.
Installing it
Part of the comfyui-panels pack. Install via ComfyUI Manager (search "comfyui-panels"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_panels
Restart, let Manager pull in the Python deps (shapely, matplotlib, opencv-python). No models, no keys.
Where people get burned
The trap is exactly the default values. 2480×3508 is a great page size for a print comic and a terrible match for a 1024×1536 latent. The panel shapes, the masks, and the edge drawings all scale relative to this rectangle, so if the canvas doesn't match the image you're actually feeding the sampler, your masks land in the wrong place or the wrong aspect ratio. Set the canvas to the resolution you're generating at and keep it consistent through the graph - that one habit prevents most of the "why is my mask in the wrong place" threads this pack's nodes attract.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 24800–5000 | — |
| height | INT | 35080–5000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| POLYGON | POLYGON | Panel (Shapely Polygon) |