Nodes/ComfyUI-enricos-nodes/πŸ’œ Compositor (V3)
ComfyUI Node

πŸ’œ Compositor (V3)

The node that finally lets you place images by dragging, not by coordinate math

By erosDiffusionΒ·Created 2 years agoΒ·Updated about a month agoΒ· 634
πŸ’œ Compositor (V3)
  • config
  • extendedConfig
  • transforms
  • image
  • layer_outputs
β—„fabricData{}β–Ί
β—„imageNamenew.pngβ–Ί
β—„toolstrueβ–Ί

The Compositor is the reason most people install this pack, and it's the node people actually mean when they say "the compositor node" in ComfyUI threads. It turns the graph into a mini layer editor: you feed it up to 8 images (plus optional masks), and instead of typing pixel coordinates into a paste node you drag, rotate, scale and flip them on a real canvas that lives right in the ComfyUI page. The most common recipe people land on: cut a subject out with rembg or BiRefNet, feed the transparent PNG into the Compositor, place it on your background, then run the result through an img2img pass so the lighting actually matches. That last step matters - no compositor makes the lighting match for you.

V3 is the mature, battle-tested version. The author rewrote the code for 3.0.0 and has been shipping fixes to it since; it's the one the community recommends in threads like the "insert cartoon faces into a scene" ask, where the answer is basically "use the Compositor and then blend with img2img."

How it works

Wire a CompositorConfig3 node's config output into the config input, and run the flow once. The node pauses execution - it returns an ExecutionBlocker - and hands you a fabric.js canvas in the UI. You compose, and when you mouse out of the canvas it auto-saves the snapshot and re-queues the flow. On later runs it loads that saved composition back, and your transforms (position, scale, rotation, z-order) persist across generations and workflow reloads.

Three inputs you'll actually touch:

  • config - the COMPOSITOR_CONFIG object from CompositorConfig3. This is the whole source of truth: canvas size, images, masks.
  • fabricData - a JSON string holding the canvas state (transforms, bounding boxes). It's auto-managed by the frontend; leave it alone.
  • imageName - the filename of the saved snapshot. Also auto-managed, defaults to new.png.

Outputs: image (the flat composite - wire this into Save Image or your sampler), transforms (JSON with per-layer position/scale/angle, for the Transforms Output node), and layer_outputs (a COMPOSITOR_OUTPUT_MASKS socket for the Masks Output node).

Installing it

No model downloads, no heavy dependencies - this pack is pure PIL/NumPy/torch, all of which ComfyUI already ships. Easiest path is ComfyUI Manager: search "Compositor" and install the one by erosDiffusion. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/erosDiffusion/ComfyUI-enricos-nodes.git

Restart ComfyUI. The nodes appear as "πŸ’œ Compositor (V3)" and friends.

Common issues

The flow pausing feels like a bug the first time. It isn't - the node stops so you can compose, then you hit Queue again. Two things burn people consistently:

  • Random seeds on the left of the node. When you change the config the node stops, grabs a capture, and re-enqueues your prompt. With a random seed that means every edit effectively re-rolls the downstream generation. The author is explicit about this in the README - there is no real pause, so don't leave a random seed feeding the sampler downstream of this node unless you want a loop.
  • Wrong-looking alpha. Masks get applied automatically, and whether you need invertMask on depends on where your mask came from. If your composite comes out looking gray or inverted, flip invertMask in the config before you suspect a broken workflow. (A couple of people have hit an all-gray V3 output; the README's 3.1.3 fix note is to delete and re-instantiate the node after a ComfyUI update.)

One more: the canvas isn't scaled, so if you're building a 5k composition you're also trying to see it on a 5k monitor. For the intended workflow - 512–1024px canvases that feed a sampler - it's fine.

Categoryimage

Inputs (5)

NameTypeDefaultDescription
configCOMPOSITOR_CONFIGβ€”
fabricDataSTRING{}β€”
imageNameSTRINGnew.pngβ€”
toolsoptBOOLEANtrueβ€”
extendedConfigoptCOMPOSITOR_CONFIGβ€”

Outputs (3)

NameTypeDescription
transformsSTRINGβ€”
imageIMAGEβ€”
layer_outputsCOMPOSITOR_OUTPUT_MASKSβ€”