ComfyUI Node

CPA Proxy

The 1080p stand-in that makes 4K matting affordable

By rik-python·Created about a month ago·Updated 9 days ago· 50
CPA Proxy
  • images
  • proxy

CPA Proxy does one thing: takes an IMAGE batch and hands back the same batch scaled down. One input, one output, no options. If you're wondering why that's a node at all, the answer is a number - 1920×1088, which is the size LTX-2.5's alpha-gen IC-LoRA is tuned for.

Everything else in the pack follows from that. Run a UHD 4K plate at 4K through a model trained for 1080p and you don't get four times the detail, you get a slow render and an edge that's soft anyway. So when the plate is bigger than 1920×1088, the pack mattes a proxy instead: this node produces it, the whole matte pipeline runs on it, and a later stage re-renders the subject's edges at native resolution in overlapping tiles. The proxy decides what the subject is; the tiles decide how the strands look.

The mechanism

Scale is the largest even-numbered size with the plate's aspect ratio that fits inside LTX's native frame, and never larger than the plate itself. Orientation is respected - a vertical plate targets 1088×1920 rather than being crushed into letterbox-land.

The resize is INTER_AREA, which is the right call and worth flagging: area averaging is the correct filter for downscaling (it averages source pixels into each destination pixel instead of point-sampling and aliasing). Someone reaching for cubic here would be putting fake sharpness into a pass whose entire job is a stable, decision-quality 1080p version of the frame.

Output stays float32, deliberately. The author diffed every precision change in this pack against the previous output, and found that rounding the isolated plate's colours by a single 8-bit level produced a visibly different sample once it went through the generative pass. Anything feeding LTX stays full precision; uint8 is only used where it saves real RAM downstream. So: proxy in float32, plate storage in uint8, alpha in float16.

Inputs and outputs

One of each. images in - the native plate, typically straight from your loader or a crop/resize chain. proxy out, as an IMAGE batch at the reduced size.

You will almost never wire this by hand, because the generator node inserts it for you when it sees a plate wider than 1920 or taller than 1088. It's registered in the graph as a real node specifically so ComfyUI's cache works on it: the proxy of a 242-frame 4K plate is expensive to compute once and free to reuse, and reuse is the whole game when you're iterating on a matte.

When it shows up, and what it costs you

Look in the console during a 4K run and you'll see the native-edges stage report how many tiles it picked. Then look at your RAM graph and you'll see this node's output sitting there for the duration - a 1080p float32 batch, which is about 25 MB per frame. Two hundred and forty-two frames of that is 6 GB before anything else runs. That's not the reason a long 4K shot eats 73–97 GB, but it's a line item.

The honest trade is in the author's own numbers: on a 49-frame UHD 4K preview with native edges on, about 9 minutes and 24 GB; with native edges off - which means you're looking at this proxy scaled back up - about 4 minutes and 20 GB. Switch native edges off when you're triaging shots or when your subject's hair is thick enough that 1080p already resolved it. On single strands and flyaways the difference is obvious; on braids it isn't.

Install

Nothing separate - it ships inside the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/rik-python/ComfyUI-Comfy-Pro-Alpha-Generator.git
pip install -r ComfyUI-Comfy-Pro-Alpha-Generator/requirements.txt

Restart ComfyUI afterwards. It pulls OpenCV (opencv-python-headless) via the requirements file, which is what does the resize. ComfyUI 0.38+ is required, and the pack is free for non-commercial use - commercial or studio work needs a licence from the author.

Should you care about it?

Only in one scenario, and it's a good one: you have a 4K plate, your edges look softer than they should, and you want to know whether the problem is your subject or your resolution. Turn native_edges off and compare. If the matte barely changes, the proxy was never the bottleneck and you've saved yourself an hour per shot.

One caveat on that test. Near other people, the pack keeps the proxy's result on purpose - a tile only sees part of the frame and decides worse about who's in front. So a soft edge exactly where your subject's shoulder touches someone else isn't the proxy failing, it's the design saying "don't trust a crop here."

CategoryComfy Compositing/internal

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE—

Outputs (1)

NameTypeDescription
proxyIMAGE—