MultiLatentComposite
Paste latents together on a canvas, feathers included
- samples_to
- samples_from0
- LATENT
ComfyUI ships a LatentComposite node, but it composites exactly one latent onto another and you set the offset blind. MultiLatentComposite from Davemane42's pack does the same job for as many layers as you want, on a visible canvas, with a feather control so the pasted regions blend instead of leaving hard rectangle scars.
The use case: you generate several separate images - say a person, a background, and an object - encode each with a VAE, and paste them together into one latent that you then run through a single sampler pass. That's the standard "composite latents" workflow, and it's the right tool when you want to combine crops that were each generated at their own resolution without the harsh crop edges that simple latent pasting leaves behind.
How it works
The samples_to input is the base latent that gets written into. Each samples_from input is one layer pasted on top, and the node blits each source's samples tensor into the base at the pixel coordinates you set (divided by 8 internally, since latent space runs at 1/8th resolution). When feather is zero it's a straight copy - hard edges. With feather, it builds a linear ramp mask along the edges and crossfades between the source and whatever is underneath, so the seam softens over the feather distance.
The canvas is the selling point. The node reads the width/height from whatever upstream node feeds samples_to (usually an EmptyLatentImage or VAEEncode), draws the base as a filled rectangle with a 64px grid, and overlays each layer's zone in its own color. You select a layer with the index widget and nudge its x, y, and feather; the right-click menu inserts, swaps, and removes layers, or strips all the unconnected inputs at once. Select the node and it outlines the upstream node feeding the current layer, so you always know which image is which.
The inputs and outputs that matter
samples_to- LATENT. The base canvas everything gets pasted onto. Needs to be connected; the canvas preview size comes from this input's upstream node.samples_from0- LATENT. The first layer; more get added from the right-click menu assamples_from1, etc.- Output
LATENT- the composited latent. Wire it into a KSampler'slatentinput and sample.
Per-layer widgets: x and y (placement, in pixels), feather (soft blend distance in pixels), and index (which layer you're editing).
Installing it
Install via ComfyUI Manager (search "ComfyUI_Dave_CustomNode") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Davemane42/ComfyUI_Dave_CustomNode
Then restart ComfyUI so the front-end JS gets copied into web/extensions/Davemane42. No model downloads, no pip dependencies - the whole pack is just this node, MultiAreaConditioning, and two conditioning helpers.
Where people get burned
The README is refreshingly honest about the one real footgun: there is no out-of-bounds check. Drop a layer partly outside the canvas and the code happily writes past the tensor's edge - that's a crash or garbage latent, not a graceful warning. Keep every rectangle inside the base's bounds. And like the rest of this pack, it's old and lightly maintained; the canvas rendering can fight with newer ComfyUI versions, so test it with a throwaway workflow before betting a big generation on it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| samples_to | LATENT | — | |
| samples_from0 | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |