Nodes/ComfyUI-Beyond_nodes/🦾 Compositor Config V4 🦾
ComfyUI Node

🦾 Compositor Config V4 🦾

The brains behind the Compositor V4 canvas

By beyondprompting·Created 9 months ago·Updated 7 months ago· 0
🦾 Compositor Config V4 🦾
  • image1
  • mask1
  • image2
  • mask2
  • image3
  • mask3
  • image4
  • mask4
  • image5
  • mask5
  • image6
  • mask6
  • image7
  • mask7
  • image8
  • mask8
  • config
width512
height512
padding100
normalizeHeightfalse
onConfigChangedContinuefalse
invertMaskfalse
saveFormatPNG Level 0 (fastest)
saveFolderoutput

Compositor Config V4 is the feeder node for the Compositor V4 canvas. It takes your up-to-eight images (each with an optional mask), your canvas dimensions, and a handful of behavior settings, and packages everything into a single config object the Compositor consumes. You don't wire images into the Compositor directly anymore - they go through this node.

This split exists for a reason. Keeping the config separate means the Compositor stays a dumb canvas, and all the "what images, what size, what masks, where are the files saved" decisions live in one clean place you can inspect and tweak without touching the visual editor. It also mirrors the V3 design, so if you've used the older pair, this will feel familiar.

How it works

On execution, Config V4 writes each input image to disk in a compositor subfolder with stable filenames (cfg{node_id}-in{index}.png), saves any masks alongside them (cfg{node_id}-mask{index}.png), and bundles it all into the config output. The Compositor reads that config, loads the files, and renders them on its canvas. That "stable filename" design is the point: it's how your layout survives reloads - the canvas can find the same images again.

It also applies masks before the compositor sees them (converting masked images to RGBA), and it computes a config signature that the Compositor uses to detect "the inputs changed" - which is what triggers the stop-and-compose behavior when you've changed your scene.

The inputs that matter

  • width, height (required, default 512) - the canvas size. Keep it reasonable; the canvas is uncompressed in your browser.
  • padding (required, default 100) - buffer space around the canvas where you can park layers or grab transform handles without them touching the export area.
  • normalizeHeight (required, default false) - scales all inputs to the same height as the canvas. Convenient, but the README warns it can lower quality.
  • onConfigChangedContinue (required, default false) - when off, a config change stops the flow so you can arrange; when on, it grabs a snapshot and continues. Random seeds upstream will re-roll when the flow restarts.
  • invertMask (required, default false) - flips the alpha of every input mask before it's applied.
  • saveFormat / saveFolder - how and where compositor images are saved. temp doesn't survive reloads; output does.

Then the eight optional image1image8 slots, each with a matching mask1mask8.

Output: config (COMPOSITOR_CONFIG) - wire it straight into Compositor V4's config input.

Install

Part of ComfyUI-Beyond_nodes. ComfyUI Manager → search "Beyond_nodes" → install → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/beyondprompting/ComfyUI-Beyond_nodes

Restart. One caveat specific to the V4 nodes: they use ComfyUI's newer comfy_api extension API, so they need a recent ComfyUI. If you see "Failed loading Compositor nodes" in the startup log, update ComfyUI, not the pack.

Common issues

  • The canvas shows nothing. You connected images to the Config but forgot to connect config to the Compositor - or you didn't connect the Compositor's image output anywhere, so nothing downstream forces it to run.
  • Layout lost on restart. Check saveFolder - temp is wiped. Switch to output for persistence.
  • Masks look inverted. That's the invertMask toggle, per the README: "the implementation of mask was not correct... now it's possible to invert the mask via toggle."
  • Everything is slow. You imported eight 4K images into a big canvas. The README's own advice: keep it reasonable.
Categoryimage

Inputs (24)

NameTypeDefaultDescription
widthINT5120–16384Width of the composition area in pixels
heightINT5120–16384Height of the composition area in pixels
paddingINT1000–16384Extra space around the composition area for positioning images outside the canvas
normalizeHeightBOOLEANfalseScale all input images to the same height while maintaining aspect ratio
onConfigChangedContinueBOOLEANfalseWhen enabled, automatically grabs the snapshot and continues execution. When disabled, pauses to allow manual composition
invertMaskBOOLEANfalseInvert the alpha channel of all input masks before applying them to images
saveFormatCOMBOPNG Level 0 (fastest)Image format for saving compositor images. PNG Level 0 is fastest, Level 9 creates smallest files
saveFolderCOMBOoutputFolder where compositor images and masks are saved: temp (temporary), input, or output directory
image1optIMAGEFirst input image (optional)
mask1optMASKAlpha mask for first image (optional)
image2optIMAGESecond input image (optional)
mask2optMASKAlpha mask for second image (optional)
image3optIMAGEThird input image (optional)
mask3optMASKAlpha mask for third image (optional)
image4optIMAGEFourth input image (optional)
mask4optMASKAlpha mask for fourth image (optional)
image5optIMAGEFifth input image (optional)
mask5optMASKAlpha mask for fifth image (optional)
image6optIMAGESixth input image (optional)
mask6optMASKAlpha mask for sixth image (optional)
image7optIMAGESeventh input image (optional)
mask7optMASKAlpha mask for seventh image (optional)
image8optIMAGEEighth input image (optional)
mask8optMASKAlpha mask for eighth image (optional)

Outputs (1)

NameTypeDescription
configCOMPOSITOR_CONFIGConfiguration object containing compositor settings and processed images with mask filenames