Nodes/ComfyUI-Comfy-Pro-Alpha-Generator/Comfy Pro Alpha Generator
ComfyUI Node

Comfy Pro Alpha Generator

Comfy Pro Alpha Generator by Rikin Patel (Comfy Compositing). Matte ONE chosen subject with LTX-2.5 alpha-gen edge quality. Type what to find (person, dog, car...), click Detect, click the subject; alt-click cuts parts, shift-click adds parts.

By rik-python·Created 13 days ago·Updated about 21 hours ago· 12
Comfy Pro Alpha Generator
  • images
  • alpha
  • comp
◄fps24.000►
◄first_frame1►
◄qualityBest (v12, 2 LTX passes)►
◄renderfull shot►
◄picks{}►
◄filename_prefixcomfy_pro_alpha/shot►
◄formatpng16►
◄ltx_model▾►
◄alpha_lora▾►
◄text_encoderbuilt-in empty prompt (no text encoder needed)►
◄video_vae▾►
◄audio_vae▾►
◄vitmatte▾►
◄chunk49►
◄overlap9►
◄seed42►
◄erode10►
◄dilate15►
◄near_px15►
◄stabilize_radius2►
◄sam3_threshold0.30►
◄fast_attentiontrue►
◄clean_plate_lora▾►
◄overlap_modefalse►
◄v13_depthtrue►
◄hair_guidefalse►
◄hair_radius4►
◄attn_grow20►
◄attn_blur10.0►
◄attn_strength1.00►
◄occluder_reach20►
◄limb_cap90►
◄front_smoothing3►
◄native_edgestrue►
◄edge_colourquick►
CategoryComfy Compositing

Inputs (36)

NameTypeDefaultDescription
imagesIMAGEThe plate. Connect Load Video -> Get Video Components, Load Plate Sequence, or any crop/resize chain. Then click 'Load plate' in the node. Best quality at 1920x1088 (a 1920x1080 plate is padded to 1088 automatically): LTX alpha-gen is tuned for that size. Bigger plates (4K, DCI, 2K) are matted on a 1080p proxy, with the edges rendered again at native resolution (native-resolution edges). Smaller plates work, but edges can come out softer.
fpsFLOAT24.0001–240Plate frame rate (connect Get Video Components / Load Plate Sequence fps)
first_frameINT10–10000000Frame number of the first image (1001 for VFX plates): output files use it
qualityCOMBOBest (v12, 2 LTX passes)2 options: Best (v12, 2 LTX passes), Fast (v7, 1 LTX pass)
renderCOMBOfull shotpreview chunk = first 49 frames from the pick frame
picksSTRING{}Set by the picker; JSON.
filename_prefixSTRINGcomfy_pro_alpha/shot—
formatCOMBOpng162 options: png16, exr
ltx_modelCOMBORecommended: ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors | folder: ComfyUI/models/diffusion_models/ (press R after adding files) | Low RAM/VRAM: LTX-2.5-Distilled-Q4_K_M.gguf (needs the ComfyUI-GGUF node pack); keep models on an NVMe SSD so ComfyUI streams them from disk
alpha_loraCOMBORecommended: ltx-2.5-22b-ic-lora-alpha-gen-0.9.safetensors | folder: ComfyUI/models/loras/ (press R after adding files)
text_encoderCOMBObuilt-in empty prompt (no text encoder needed)built-in empty prompt (no text encoder needed): same result, skips loading the 13 GB encoder. Or pick gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors from ComfyUI/models/text_encoders/
video_vaeCOMBORecommended: ltx-2.5-video-vae-conv-bf16.safetensors | folder: ComfyUI/models/vae/ (press R after adding files)
audio_vaeCOMBORecommended: ltx-2.5-audio-vae-bf16.safetensors | folder: ComfyUI/models/vae/ (press R after adding files)
vitmatteCOMBOFolder in ComfyUI/models/vitmatte/, or auto-download on first run
chunkINT499–145LTX renders the shot in chunks of this many frames (8n+1). 49 fits 1920x1088 on 32 GB.
overlapINT90–72Frames shared by neighbouring chunks and cross-faded so the joins don't show. More = smoother joins but more chunks (slower). 9 = a new chunk every 40 frames.
seedINT420–2147483647—
erodeINT100–64—
dilateINT151–64—
near_pxINT151–64v7 zone around other excluded subjects (Best)
stabilize_radiusINT20–6Removes frame-to-frame chatter in the SAM3/ViTMatte edges: each frame is averaged with this many frames before and after, warped by optical flow (occlusions are ignored). 0 = off, 2 = default (5-frame window). Higher is smoother but fast motion can lag or ghost, and it is slower. LTX edges are already stable.
sam3_thresholdFLOAT0.300–1—
fast_attentionBOOLEANtrueComfy Kitchen int8 attention for LTX: about 36% faster sampling, matte difference ~0.004 (7x smaller than changing the seed). Turn off to use standard PyTorch attention.
clean_plate_loraoptCOMBORecommended: ltx-2.5-22b-ic-lora-clean-plate-1.0.safetensors | folder: ComfyUI/models/loras/ (press R after adding files) | Only for edge colour = perfect; without it perfect runs as quick
overlap_modeoptBOOLEANfalseFor people crossing the subject (hands, arms, hair). LTX mattes the subject and everyone else on the real plate (3 LTX passes instead of 2, plus a depth pass) and subtracts the others where SAM3 and depth say they are in front: their fingers and curls come out crisp instead of soft. Replaces the quality setting. If a limb of the subject that rests on someone goes missing, add a click on it. Needs other subjects picked; without them it runs Best (v12).
v13_depthoptBOOLEANtrueDepth Anything V2 Small decides who is in front where SAM3 gives a pixel to both people or neither (fingers over a chest). Off = SAM3 alone (a local vote): faster, but fast thin fingers in front of the subject can ghost.
hair_guideoptBOOLEANfalseOverlap (v13) only. Where someone's hair crosses the subject, re-fit their hair matte to the plate's own edges (guided filter): more single strands, cleaner gaps between curls. Can read dark stripes or patterns on the subject's clothes as hair, so check the comp. Off by default.
hair_radiusoptINT41–16How far the hair sharpening looks for plate edges. Smaller = finer strands but noisier; larger = smoother but picks up more clothing pattern.
attn_growoptINT200–80How far each SAM3 mask is grown before it steers LTX's attention, so hair outside the SAM outline is still matted. Tested best: 20.
attn_bluroptFLOAT10.00–40Feather of that attention mask. 0 = hard edge (cuts hair, ~1.5x error). Tested best: 10.
attn_strengthoptFLOAT1.000–1How strongly LTX follows the attention mask. Lower lets it drift to other people. Tested best: 1.0.
occluder_reachoptINT200–60How far past an in-front person's overlap the subtraction reaches, to catch their soft edge (strands, fast fingertips). Larger can bite the subject's own thin parts. Tested best: 20.
limb_capoptINT9020–400LTX also draws parts of the subject it cannot see (amodal). Anything further than this from the SAM3 selection is removed (fades over the last 40 px). Raise it if real edges far from the selection get cut. Tested best: 90.
front_smoothingoptINT31–9Frames averaged so the in-front / behind decision never pops. 1 = off. Tested best: 3.
native_edgesoptBOOLEANtruePlates bigger than 1920x1088: LTX also renders the subject's edges on native-resolution 1920x1088 tiles, for strand-level detail at the plate's own size. Roughly 2-3x the render time on a 4K plate. Off: matte at 1080p and scale the alpha up (fast). Plates at 1080p or smaller are not affected. Plates only a little bigger than 1080p (up to about 2300 px wide, e.g. 2K) gain little detail for the full tile cost: switch it off there to save time.
edge_colouroptCOMBOquickquick: rebuilds the colour of the soft edges from the subject itself, so sky or grass behind hair does not stay in the strands (CPU, no extra VRAM: about 2 s a frame at 1080p, 4 s a frame at 4K). perfect: LTX Clean Plate rebuilds the background, which is then subtracted from the edges (one extra LTX pass per chunk on the 1080p proxy, plus about 2 s a frame at 4K; needs the Clean Plate IC-LoRA). off: the raw plate in the edges, as v0.4.1. The alpha is the same in every mode. Saves rgba_ files next to the alpha.

Outputs (2)

NameTypeDescription
alphaMASK—
compIMAGE—