Nodes/comfyui-image-expand-nodes/Image Expand Option
ComfyUI Node

Image Expand Option

The two dropdowns that steer your whole outpaint

By tuki0918·Created 9 months ago·Updated 8 months ago· 0
Image Expand Option
    • expand_options
    direction
    mode

    Image Expand Option is the unglamorous brains of this little three-node pack: it doesn't touch a single pixel, yet it decides everything the other two nodes do. You set it once, and both the Noiser and the Merger read the same config, which is exactly why it exists. Rather than pass direction and mode separately into two nodes and risk them disagreeing, you drop this one in, wire its single output to both, and change one dropdown instead of two.

    It's a config node, so it has exactly two inputs, and they're the whole story:

    • direction - top, bottom, left, or right. Pick the side you're extending.
    • mode - outside or inside. This is the choice that actually matters, so think it through before you click:
      • outside means grow the canvas: the pack will regenerate a strip on that side and the final image gets bigger. That's classic outpainting - extending a photo or adding sky above a horizon.
      • inside means keep the canvas the same size and overwrite a strip of the existing image. That's inpainting a band in place - think "regenerate this slice along the top edge without resizing anything."

    Both nodes downstream read this same expand_options object, so if you change your mind about the side mid-workflow, just edit this node and queue again. No rewiring. That's the node's entire job, and it does it without importing anything heavier than a dict.

    One real limitation worth knowing before you build a workflow around it: direction is single. If you want to extend both the top and the bottom, you run the pipeline once for top, then feed the merged result back in for bottom. It's chained, not simultaneous - fine for a hobby pack, just plan the graph accordingly.

    A word on the pack itself, because it colors what to expect. This is a small, MIT-licensed utility from an individual dev (tuki0918, mostly known for Eagle image-organizer plugins), roughly zero community footprint and no model downloads, stars, or pip dependencies to speak of. That's not a knock - it means what you see is what you get: three small, readable nodes that do one thing. For a one-direction strip outpaint it's genuinely enough. For full-canvas, multi-side extension you'll usually reach for a crop-and-stitch pattern or an instruction-editing model instead, but as a teaching tool for how outpainting actually works, this pack is hard to beat because you can read the whole source in five minutes.

    Installing it is the easy part - no dependencies, no model files, nothing to download:

    # ComfyUI Manager: Custom Nodes Manager → search "ComfyUI Image Expand Nodes" → Install → restart
    
    # or manually:
    cd ComfyUI/custom_nodes
    git clone https://github.com/tuki0918/comfyui-image-expand-nodes.git
    # restart ComfyUI - that's it, no pip install
    

    Restart, find Image Expand Option under Image/Processing, and let it be the first thing in your graph. Everything downstream will follow its lead.

    CategoryImage/Processing

    Inputs (2)

    NameTypeDefaultDescription
    directionCOMBO4 options: top, bottom, left, right
    modeCOMBO2 options: outside, inside

    Outputs (1)

    NameTypeDescription
    expand_optionsEXPAND_OPTION