Atlas Membrane Composite π©Ή
Make generated fill actually match the plate
- fill
- reference
- mask
- image
- report
Every generated inpaint has two tells: a colour cast that doesn't match the surrounding plate, and a seam where the generated pixels meet real ones. Atlas Membrane Composite is the one node that fixes both. It's the correction stack the atlas-camera engine applies around every generated fill - plate-referenced gain/offset colour match, chroma-only cast neutralization from a ring of real pixels, the harmonic membrane that erases the rim seam, then the masked composite. All of it, in one node, in the Atlas/advanced folder.
The author's own measurements are in the docstring: the membrane takes the seam from about 2.2x down to ~1.0 of the plate's own gradient statistics. That's the difference between a hole you can see from across the room and a repair you have to zoom into to find.
How it works
Three stages run in sequence:
- Colour pair - a gain/offset match of the fill against real plate pixels, so overall brightness and exposure line up before anything else happens.
- Cast neutralization - it measures the generator's colour cast using a ring of real pixels just outside the hole (that's what cast_band_px controls), then removes the chroma bias. Real pixels only - the node never reads the fill to grade the fill, which is what keeps it from chasing its own noise.
- Membrane + composite - the harmonic membrane blends the seam, then the hole pixels land in the reference.
You can also flip colour_correct off if you want the membrane alone - useful when the fill already matches and you only need the seam gone.
Inputs and outputs
Required inputs:
- fill - the generated fill, any raster. It's resized to the reference if needed, so mismatched resolutions aren't a blocker.
- reference - the plate render you're compositing into. Holes may carry a sentinel value; the corrections only ever read real pixels.
- mask - the hole: where fill pixels land.
Optional inputs:
- cast_band_px - ring width (in pixels) outside the hole used to measure the cast. Default 48; raise it for large holes, lower it for tight ones.
- colour_correct - apply the plate-referenced colour pair before the membrane. Default on.
Outputs: image (the composited result) and report.
Installing it
Nothing special needed - this node is pure raster math:
cd <ComfyUI>/custom_nodes
git clone https://github.com/mikejamesvfx/atlas-camera.git
Restart ComfyUI. It lives in Atlas/advanced, the pack's gated folder, so if it doesn't show in the menu set ATLAS_EXPERIMENTAL=1 before launching. ComfyUI Manager finds the pack as "atlas-camera".
Common issues
The sentinel is the subtle one: if your reference carries sentinel hole pixels (which the pack's hole masks do), the corrections skip them automatically - but if you've already composited the fill into the reference before this node, the "real pixels" ring includes your own fill and the colour match silently converges on the cast you were trying to remove. Keep the fill and reference separate until this node runs.
Also, the cast ring is your quality knob. A 48px default is right for a normal hole, but a hole wedged against the frame edge leaves no real pixels on one side - widen the band or accept a weaker match rather than chasing it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| fill | IMAGE | Generated fill (any raster β resized to the reference if needed). | |
| reference | IMAGE | The plate render to composite into. Holes may carry the sentinel; the corrections only ever read real pixels. | |
| mask | MASK | Hole: where fill pixels land. | |
| cast_band_pxopt | INT | 484β256 | Ring width outside the hole used to measure the generator's colour cast against real pixels. |
| colour_correctopt | BOOLEAN | true | Apply the plate-referenced colour pair before the membrane. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| report | STRING | β |