CPA NativeEdges
Rendering 4K Strands One Tile at a Time
- selection
- plate
- others
- model
- positive
- negative
- vae
- audio_latent
- noise
- sampler
- sigmas
- tiles
- coverage
- count
Scale a 1080p matte up to 4K and the hair tells on you. Every single strand becomes a soft band, twice as wide, with the background smeared into it - "grass baked into the strands" is how the pack's README puts it. The alpha is numerically valid and it looks like a scaled matte.
CPA NativeEdges is the pack's answer, and it's the most structurally interesting node in the whole thing, because it expands at run time. Which tiles it needs isn't known until SAM 3 has tracked the subject and there's an actual selection to look at, so the node builds its own subgraph on the fly, after the tracking stage has already run.
What it does
On a plate bigger than 1920x1088, the whole pipeline has been running on a 1080p proxy - that pass decides what the subject is, and it's good at that. Then this node cuts the native plate into 1920x1088 tiles with at least 50% overlap (tiles follow the plate's orientation, so a portrait plate gets 1088x1920) and checks which tiles the subject's edge actually touches. It looks at a ±30px band around the selection outline across the whole frame range, so a tile that only sees the subject's interior - or nothing at all - never gets rendered.
For each selected tile it builds: a native-resolution isolated plate (CPA NativeIsolate), an empty LTX latent at the tile's size, and one chunked alpha-gen pass per chunk, guided by the tile crop through the IC-LoRA guide node. Then a CPA TileMerge feather-blends the tile results into native-resolution frames and produces a coverage map.
Outputs: tiles (the merged native alphas), coverage (how much of the frame the rendered tiles actually cover - computed once, since the tile set is chosen for the whole range), and count (how many tiles ran, which lands in the final info JSON so you can see the cost).
CPA Final consumes all three and does the merge you'd expect: the proxy result keeps the subject's solid core, keeps everything near other people, and keeps anywhere a tile disagrees with the proxy over an area. Everywhere else, the tiles supply the strands. Tiles only refine edges; they never get to make big structural decisions, because a tile sees a slice of the frame and decides worse.
The caching trick worth stealing
plate, others, model, positive, negative, vae, audio_latent, lora_scale, noise, sampler and sigmas are all declared as real optional inputs, even though the node only uses links stored in its config JSON. That's deliberate, and the docstring says why: ComfyUI keys its cache on real inputs, so wiring them means a new seed, model, LoRA, VAE or fps invalidates the tiles properly. Without it you'd change the seed, re-queue, and get stale tiles that look identical to the last run for reasons you'd never guess.
If you're writing expansion nodes for ComfyUI, that's the lesson: your real dependency graph has to be visible to the engine, not just to you.
Practical limits
There's a hard cap of 64 tiles, which is roughly a 10K-wide plate. Beyond that the node raises a clear error and tells you to switch native edges off or crop - better than the alternative, which is quietly needing 100 passes.
On a long 4K shot, RAM is the real constraint: every native frame is held, and the pack measures 97 GB peak at 242 frames with native edges on. Split into ~100-frame runs, or switch the feature off for the first look.
And it's worth being honest about when this is wasted effort. On thick hair - braids, a solid bob - the edge is already resolved at 1080p and you'll see no difference. On a 2K plate, very little difference for the full tile cost. This pays off on single strands, flyaways and fur, and nowhere else.
Install
Part of the pack, but the tile path calls ComfyUI's LTXAddVideoICLoRAGuide from the LTX support in core, so an older install will fail with a message telling you to update ComfyUI or switch native edges off.
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
You need ComfyUI 0.38+, ComfyUI-LTXVideo and ComfyUI-SAM3, plus the LTX-2.5 transformer, the alpha-gen IC-LoRA and the conv video VAE. The node itself is hidden from the menu - flagged deprecated like every internal stage - and it appears in the graph when native-resolution edges is on, which it is by default for plates over 1080p.
The pack's own numbers on a 4K plate with long fine hair: 49-frame preview goes from about 4 minutes to about 9, and a 242-frame shot from 19 minutes to 58. That's the price of single strands, and it's the right trade on a hero shot and the wrong one on a look-dev pass.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| selection | MASK | — | |
| config | STRING | — | |
| plateopt | IMAGE | — | |
| othersopt | MASK | — | |
| modelopt | MODEL | — | |
| positiveopt | CONDITIONING | — | |
| negativeopt | CONDITIONING | — | |
| vaeopt | VAE | — | |
| audio_latentopt | LATENT | — | |
| lora_scaleopt | FLOAT | — | |
| noiseopt | NOISE | — | |
| sampleropt | SAMPLER | — | |
| sigmasopt | SIGMAS | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| tiles | MASK | — |
| coverage | MASK | — |
| count | INT | — |