Nodes/Atlas Camera/Atlas Interpass Gate 🚦
ComfyUI Node

Atlas Interpass Gate 🚦

A quality gate that refuses to polish garbage

By mikejamesvfxΒ·Created 3 months agoΒ·Updated a day agoΒ· 1
Atlas Interpass Gate 🚦
  • fill
  • guide
  • mask
  • fill
  • ok
  • report
β—„max_shift_px2.0β–Ί

AtlasInterpassGate is the pack's built-in bouncer. In a two-pass generation pipeline - where a first pass lays down structure and a second pass adds texture - it scores the pass-1 fill against the plate it has to join, and if the fill fails its checks it quietly passes the untouched guide through instead. That fallback is the whole design: downstream nodes degrade to a no-op rather than polishing a bad fill into something that looks fine in isolation and falls apart in the composite.

If you've ever watched a pipeline happily texture a fill that was misregistered by three pixels, or bleed sentinel colours into the seams, you know why this node exists. Each of its checks encodes a failure the pack actually hit in production.

How it works

You wire in three things: fill (the pass-1 structure fill), guide (the plate render the fill must join - its holes may carry a sentinel colour), and mask (the generation hole). The gate then runs a battery of checks against the fill, including:

  • a gradient-error check comparing the fill to the guide,
  • a global misregistration check via phase correlation over the unmasked area,
  • a sentinel-bleed check for whether sentinel colours leaked into the fill.

max_shift_px (default 2) sets the maximum global misregistration you'll tolerate - a reasonable half-pixel-to-2px window for most projection work. The output fill is the candidate when the gate passes, and the untouched guide when it fails, so the texture pass after it has nothing to do and doesn't make things worse. The ok boolean and the report string tell you exactly what was checked and which check tripped.

The inputs

fill, guide, and mask are all required. max_shift_px is optional. Outputs are fill (either the candidate or the guide), ok (BOOL), and report.

An empty hole (nothing was generated) is handled gracefully: the guide passes through and the report says so.

Install and gotchas

Ships with the pack - install once via ComfyUI Manager (search atlas-camera) or git clone https://github.com/mikejamesvfx/atlas-camera.git into custom_nodes, restart. It lives in the Atlas/advanced menu alongside the other gated, experimental-adjacent nodes. It's pure analysis and image selection - no models, no GPU, no extra dependencies.

The gotcha is conceptual rather than mechanical: a gate is only as good as its threshold, and max_shift_px is a judgement call. Too tight and you'll reject decent fills and fall back to the guide more often than you should; too loose and the gate becomes theatre. Start at the default 2px, and watch the report's numbers for a few runs before adjusting - the report is the whole interface to knowing whether the gate is actually protecting you. Also note it's a single-frame doctrine: batched inputs are gated on frame 0, which the report flags.

It's a small, opinionated node that encodes real production pain. If your two-pass fills occasionally ship misaligned or sentinel-stained, this is the safety rail you didn't know you needed.

CategoryAtlas/advanced

Inputs (4)

NameTypeDefaultDescription
fillIMAGEPass-1 structure fill.
guideIMAGEThe plate render the fill must join (holes may carry the sentinel).
maskMASKThe generation hole.
max_shift_pxoptFLOAT2.00.5–32Maximum global misregistration (phase correlation over the unmasked area).

Outputs (3)

NameTypeDescription
fillIMAGEβ€”
okBOOLEANβ€”
reportSTRINGβ€”