LTX Color Mask
Your mask is white. The LoRA was trained on colored ones.
- mask
- colored_mask
LTX Color Mask is the node you reach for when the identity-transfer workflow you downloaded says "color mask here" and everything you have is a white blob out of SAM2. The scail2v2-family LTX 2.3 identity LoRAs this pack exists for weren't trained on binary masks - they were trained on color-coded ones, where the color itself is the link between "this mask region" and "this identity." Blue means person 0, red means person 1, x-sorted left-to-right. That convention is the whole trick, and this node is a translator for it.
How it works
It's a pure pixel operation - no model, no weights, no VRAM beyond the tensor you hand it. Any non-black pixel counts as "inside" the mask, and the node recolors it according to two roles, because the training recipe uses two different mask formats for two different slots:
- silhouette - recolors the mask but keeps the full shape. This is for the guide mask slot (
mask_video). The shape is doing real work there: it tells the model where and in what pose to place the identity, so it has to survive. - flat_marker - recolors and collapses the whole mask to a small solid dot at its centroid, throwing the shape away entirely. This is for the identity mask slot (
identity_mask_image). The color is all that matters there. Feed a body-shaped mask into the identity slot and you re-inject a competing pose signal - the reference's own held pose bleeds into the output. That's exactly the bug the flat-marker design was built to kill, on the training-data side first.
The output is a single colored_mask IMAGE you can preview in the node graph, which is the fastest way to confirm you didn't wire it backwards.
The inputs that matter
Honestly there are only two you'll touch most of the time:
- color - pick the preset for the person. Default is blue (person 0); red is person 1.
customunlockscustom_r/g/bif your checkpoint's palette doesn't match. - style - silhouette for the guide slot, flat_marker for the identity slot. They are not interchangeable.
marker_radius_frac (default 0.06) sizes the flat marker's dot as a fraction of min(H, W) and already matches the training-side flatten_ref_masks.py default, so leave it alone unless the dot is visibly off. background_black defaults to on, which gives you a clean colored-on-black canvas - turn it off only if your source mask isn't black/white to begin with.
Wiring it in
The mask feeds straight out of a SAM2/SAM3 segmentation into this node, then into the identity slots of the pack's conditioning node (LTX Multiple Controls). One caveat worth knowing before you over-trust the labels: the Multiple Controls node's own tooltip insists its mask_video slot wants a plain white-on-black binary for the v13 recipe and explicitly warns a colored mask leaks hue into generated clothing. So when a recipe asks for a colored silhouette, it usually means the guide-mask context from the older/training convention - when in doubt, follow the exact workflow you downloaded and check which slot actually wants color.
Installing it
LTX Color Mask ships in ComfyUI-BFSNodes by alisson-anjos (the same Alisson whose EditAnything and Best-Face-ID LoRAs these nodes support). Easiest path is ComfyUI Manager → search "BFSNodes" → Install. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/alisson-anjos/ComfyUI-BFSNodes.git
cd ComfyUI-BFSNodes
pip install -r requirements.txt
Restart ComfyUI after. Fair warning: the pack's requirements.txt pulls heavy face/audio deps (insightface==0.7.3, onnxruntime, librosa, opencv-python) that this node doesn't need - they're for the pack's face-ID nodes. If the install trips over insightface, that's not this node's problem, but you do have to get past it to load the pack.
Troubleshooting
Most problems are wiring, not the node. If the output looks empty, your source mask is probably all-black (the node only recolors non-black pixels). If the identity marker is barely visible, bump marker_radius_frac. And if identity still drifts, it's not the color - LTX 2.3's prompt adherence is its weakest axis, and seed-hunting beats prompt-editing almost every time.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | IMAGE | Plain white/binary mask (e.g. from SAM2), one or more frames. Any non-black pixel counts as 'inside' the mask, regardless of exact shade. | |
| color | COMBO | blue | Preset color to recolor the mask to (matches scail2v2's per-person palette: blue=person 0, red=person 1, x-sorted left-to-right). Pick 'custom' to use the custom_r/g/b inputs instead. |
| style | COMBO | silhouette | silhouette: recolor, keep the full shape -- use for the GUIDE mask slot (mask_video). flat_marker: recolor AND collapse to a small dot at the mask's centroid -- use for the IDENTITY mask slot (identity_mask_image); a shaped mask there re-injects a competing pose signal (the ref's own held pose). |
| marker_radius_frac | FLOAT | 0.060.01–0.3 | flat_marker only: dot radius as a fraction of min(H, W). Matches the training-side default (flatten_ref_masks.py). |
| custom_ropt | INT | 2550–255 | — |
| custom_gopt | INT | 00–255 | — |
| custom_bopt | INT | 00–255 | — |
| background_blackopt | BOOLEAN | true | On: output background is black (matches guide_mask's white-bg-colored-shape convention actually being colored-on-black internally once VAE-encoded -- for identity_mask specifically, training used a black bg). Off: keep the mask's original background color where nothing was recolored (rare; only if your source mask isn't black/white). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| colored_mask | IMAGE | — |