ComfyUI Node

GU Sides Pack

Four outpainting paddings, one tidy wire

By alexguryev·Created 4 months ago·Updated 23 days ago· 2
GU Sides Pack
    • sides
    top0
    left0
    bottom0
    right0

    GU Sides Pack is a tuple-izer for outpainting. You feed it four integers - top, left, bottom, right padding - and it packs them into one tuple value that travels down a single wire to whatever outpainting node needs the per-side amounts. It's the "one wire instead of four" pattern from the plumbing layer, applied to the narrow, boring case of padding.

    Outpainting is where this pays off. The KB's outpainting notes are clear that the practice is "pad each side, let the model fill the gap" - and the amount you pad each side is a real workflow variable. When you're iterating on an outpaint, you adjust padding constantly, and if those four numbers live in four different places in the graph, every experiment means touching four widgets. Pack them once, and the whole experiment is one node.

    What it does

    Four required integer inputs, 0 to 8192:

    • top, left, bottom, right - the padding per side.

    One output: sides, a tuple [top, left, bottom, right] in that order. Wire it into any outpainting node that accepts a sides/padding tuple. The README's framing: "intended for outpaint, where it is convenient to set per-side padding in a single node."

    There's no math, no validation, no surprises - the node builds the tuple and passes it along. The type is a fixed 4-element integer list, so downstream consumers know exactly what they're getting.

    Why the pack has a Pack and an Unpack

    Because the GU pack's philosophy is that the whole graph should stay readable, and a four-integer tuple is a natural unit of data for anything that processes sides. The sibling GU Sides Unpack does the reverse, for when a node gives you a sides tuple and you want the four numbers back on separate wires - say, to compute something asymmetric, like "pad the right side twice as much." Pack when the data is naturally a group, unpack when you need the members. That's the entire design: no node in this pair does anything clever, and both are better for it.

    Install

    ComfyUI Manager → Custom Nodes Manager → search "GU Nodepack" → Install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexguryev/ComfyUI-GU_Nodepack
    cd ComfyUI-GU_Nodepack
    pip install -r requirements.txt
    

    Deps: psutil, requests, gu-funclib>=1.9.0. No model downloads. Windows-tested, single-user design.

    The honest caveat

    This node only helps if the outpainting node on the other end speaks the same tuple type. The [top,left,bottom,right] shape is the GU pack's convention - if your outpainting node expects a different order (some expect left/right/top/bottom, or a single uniform padding int), you'll need to arrange the inputs to match, or the unpacker to reorder. It's a packaging convention, not a standard, so glance at the consumer's docs before you wire it. For the actual outpaint quality work, remember the KB's advice: masked outpainting that keeps original pixels untouched (Inpaint Crop & Stitch style) still beats padding-and-hoping for anything that must stay byte-faithful.

    CategoryGU_Nodepack

    Inputs (4)

    NameTypeDefaultDescription
    topINT00–8192
    leftINT00–8192
    bottomINT00–8192
    rightINT00–8192

    Outputs (1)

    NameTypeDescription
    sides0,0,0,0