🦾 Compositor Config V4 🦾
The brains behind the Compositor V4 canvas
- image1
- mask1
- image2
- mask2
- image3
- mask3
- image4
- mask4
- image5
- mask5
- image6
- mask6
- image7
- mask7
- image8
- mask8
- config
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.tempdoesn't survive reloads;outputdoes.
Then the eight optional image1–image8 slots, each with a matching mask1–mask8.
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
configto the Compositor - or you didn't connect the Compositor'simageoutput anywhere, so nothing downstream forces it to run. - Layout lost on restart. Check
saveFolder-tempis wiped. Switch tooutputfor persistence. - Masks look inverted. That's the
invertMasktoggle, 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.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 5120–16384 | Width of the composition area in pixels |
| height | INT | 5120–16384 | Height of the composition area in pixels |
| padding | INT | 1000–16384 | Extra space around the composition area for positioning images outside the canvas |
| normalizeHeight | BOOLEAN | false | Scale all input images to the same height while maintaining aspect ratio |
| onConfigChangedContinue | BOOLEAN | false | When enabled, automatically grabs the snapshot and continues execution. When disabled, pauses to allow manual composition |
| invertMask | BOOLEAN | false | Invert the alpha channel of all input masks before applying them to images |
| saveFormat | COMBO | PNG Level 0 (fastest) | Image format for saving compositor images. PNG Level 0 is fastest, Level 9 creates smallest files |
| saveFolder | COMBO | output | Folder where compositor images and masks are saved: temp (temporary), input, or output directory |
| image1opt | IMAGE | First input image (optional) | |
| mask1opt | MASK | Alpha mask for first image (optional) | |
| image2opt | IMAGE | Second input image (optional) | |
| mask2opt | MASK | Alpha mask for second image (optional) | |
| image3opt | IMAGE | Third input image (optional) | |
| mask3opt | MASK | Alpha mask for third image (optional) | |
| image4opt | IMAGE | Fourth input image (optional) | |
| mask4opt | MASK | Alpha mask for fourth image (optional) | |
| image5opt | IMAGE | Fifth input image (optional) | |
| mask5opt | MASK | Alpha mask for fifth image (optional) | |
| image6opt | IMAGE | Sixth input image (optional) | |
| mask6opt | MASK | Alpha mask for sixth image (optional) | |
| image7opt | IMAGE | Seventh input image (optional) | |
| mask7opt | MASK | Alpha mask for seventh image (optional) | |
| image8opt | IMAGE | Eighth input image (optional) | |
| mask8opt | MASK | Alpha mask for eighth image (optional) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| config | COMPOSITOR_CONFIG | Configuration object containing compositor settings and processed images with mask filenames |