Nodes/ComfyUI-PanelComposer/Panel Layout Provider (PanelComposer)
ComfyUI Node

Panel Layout Provider (PanelComposer)

Design a manga page in ComfyUI before you generate a single pixel

By INuBq8·Created about a month ago·Updated about a month ago· 16
Panel Layout Provider (PanelComposer)
    • layout_json
    • panel_dimensions
    • area_image
    • area_colors
    layout_preset
    reading_order
    canvas_rotation
    aspect_ratio
    page_orientation
    canvas_size_mode
    fixed_preset_size
    fixed_custom_megapixels2.0
    megapixels1.00
    multiple64

    Making a comic page with Stable Diffusion has, until now, meant a lot of out-of-graph drudgery. Generate six panels, then open Photoshop or Clip Studio and paste them onto a page by hand, aligning gutters, cropping overflow, exporting. The community threads about comic workflows are full of people doing exactly this - the KB's own notes on the topic describe prompting as maybe a third of the work and manual compositing as the rest. Panel Layout Provider is the phase of that process this pack automates: deciding the page geometry up front, inside ComfyUI, before generation happens.

    It's the "phase one" node. It never touches pixels for the final page. Its job is to turn a layout choice into (a) a layout_json description the second node in the pack can consume, and (b) a list of per-panel dimensions you feed your own generation nodes. Pick a preset from the dropdown and it even draws a live preview of the page right on the node - client-side, no execution needed.

    How it works

    Under the hood it's polygon math. The pack ships 45+ layout presets grouped by category - Single, Splits, Grids, Diagonal, Wedge, Floating, Concave, Cascade, Strips, and more - each a set of panel polygons plus reading-order grouping. You can also draw your own layout in the node's "Draw Panels" dialog and save it as a user preset, which is stored through the pack's /panelcomposer/* routes so it shows up in the dropdown immediately.

    The interesting part is how the geometry is resolved. aspect_ratio stores only a magnitude (16:9 → 1.778); page_orientation decides which way it points. That single value determines both the page's real canvas size and each panel's suggested dimensions. canvas_rotation rotates only the panel polygons, not the page - and reading order is recomputed from the rotated polygons, so "which panel is read first" adapts to how you turned them.

    The inputs that matter

    • layout_preset - the layout, grouped by category (or a saved custom one).
    • reading_order - left_to_right or right_to_left. Set this to RTL for actual manga, before you generate anything, because it determines the order of panel_dimensions.
    • aspect_ratio + page_orientation - the page's shape.
    • megapixels - the target size for each individual panel in panel_dimensions. This is separate from the page's own size.
    • multiple - rounds every computed width/height to the nearest multiple of this. Default 64, because SDXL and Flux-era models get grumpy about dimensions that aren't divisible by 64.

    One gotcha that will bite you: the fixed_preset_size labels ("1080p", "2K", "4K") are shorthand megapixel budgets, not literal resolutions. In the source they're 2.1, 3.7, and 8.3 megapixels respectively. "1080p" here is not 1920×1080. Don't let the label fool you into thinking you're locked to a specific resolution.

    The outputs

    • layout_json - a STRING containing the panel polygons, page orientation, and canvas size. This is what feeds Panel Compositor.
    • panel_dimensions - the per-panel (width, height) list, index-aligned to reading order. This is what your generation chain consumes, via List Get Item and Tuple Unpack.
    • area_image and area_colors - a flat-color region map with one solid distinct color per panel, and each panel's exact 0xRRGGBB value. The idea is you feed this into an exact-color-match/mask node for regional conditioning: one generation pass over the full canvas, different prompts per panel region, instead of generating each panel separately.

    A word of honesty about those last two: the README says straight out that regional conditioning has not been gotten working end-to-end. area_image/area_colors are a considered, unverified starting point, not a supported workflow. Treat them as experimental. The per-panel generation path - dims out, generate each panel, stitch together - is the fully working route today.

    How to install it

    cd ComfyUI/custom_nodes
    git clone https://github.com/INuBq8/ComfyUI-PanelComposer
    

    Restart ComfyUI. ComfyUI Manager users: search "PanelComposer". There are no dependencies beyond what ComfyUI already ships (Pillow) and no models to download - the whole pack is a few hundred lines of geometry.

    Common issues

    The multiple setting is the first thing to suspect when EmptyLatentImage refuses your panel dimensions - if you dropped it below 64, some models reject the resulting sizes. And if your panels come out in the wrong sequence, it's almost always reading_order or the saved reading groups in a custom layout, not the generator. Finally, remember panel_dimensions and area_colors are both in reading order - keep them paired when you wire the workflow, and the numbering will match what the live preview shows.

    CategoryPanelComposer/Layout

    Inputs (10)

    NameTypeDefaultDescription
    layout_presetCOMBO45 options: Single / Full Page, Splits / Two Panels (Stacked), Splits / Two Panels (Side by Side), Splits / Two on Top + One Below, Grids / 2x2 Grid, Diagonal / Two Panel Diagonal, +39
    reading_orderCOMBO2 options: left_to_right, right_to_left
    canvas_rotationCOMBO4 options: 0, 90, 180, 270
    aspect_ratioCOMBO10 options: 1:1 (Square), 9:7, 4:3 (Standard), A4, 19:13, 3:2 (Classic Photo), +4
    page_orientationCOMBO2 options: portrait, landscape
    canvas_size_modeCOMBO2 options: fixed_preset, fixed_custom
    fixed_preset_sizeCOMBO3 options: 1080p, 2K, 4K
    fixed_custom_megapixelsFLOAT2.00.1–64
    megapixelsFLOAT1.000.01–16
    multipleINT641–256

    Outputs (4)

    NameTypeDescription
    layout_jsonSTRING
    panel_dimensionsPANEL_DIMENSIONS
    area_imageIMAGE
    area_colorsCOLOR_LIST