Nodes/ComfyUI-SCAIL-Pose2/SCAIL-Pose2 Colored Mask
ComfyUI Node

SCAIL-Pose2 Colored Mask

The colored mask is the whole SCAIL-2 workflow in disguise

By rookiestar28·Created 3 months ago·Updated 15 days ago· 13
SCAIL-Pose2 Colored Mask
  • driving_track_data
  • ref_track_data
  • ref_mask
  • pose_video_mask
  • reference_image_mask
object_indices
sort_byleft_to_right

SCAIL-2 doesn't use a stick figure. It takes a reference image, a driving video, and support masks - and the masks are where the whole structure of the shot lives. Who counts as a subject, who's background, which identity maps to which reference: all of that is decided in the mask. Get this step wrong and nothing downstream can save you, no matter how good your prompt is.

SCAILPose2ColoredMask is the node that turns raw SAM3 video tracks into SCAIL-2's colored RGB semantic masks. It's the front door of this pack.

What it does

You feed it track_data from a SAM3 video tracking node. It unpacks the packed per-object masks, resizes them to the original video size, and renders each selected object as a flat identity color: blue, red, green, magenta, cyan, yellow - in selection order, not the raw SAM3 object id. That ordering matters more than people expect: the first identity you keep is always blue, the second is red, and so on, and identity transfer downstream keys off those colors.

Inputs that matter

Most of them are self-explanatory, so here are the ones you'll actually touch:

  • driving_track_data - the SAM3 track of your driving pose video, from SAM3 Video Track.track_data.
  • object_indices - comma-separated indices of which tracked objects become identities. Blank keeps everything. 0 keeps the first sorted object, 0,1 the first two. This is how you pick one person out of a two-person shot.
  • sort_by - left_to_right (default) is the most predictable for two-person shots. area re-orders when one person gets bigger on screen; none keeps raw track order.

The optional ref_track_data and ref_mask are mutually exclusive - the tooltips say it plainly, and it's a real gotcha: connect one or the other, not both. Both describe the reference identity, just in different forms.

Outputs and wiring

  • pose_video_mask - the driving-side colored mask. Goes straight into SCAILPose2SCAIL2Condition.pose_video_mask.
  • reference_image_mask - a reference mask. If you don't have a separate reference mask, this is what you feed as Condition.ref_mask.

The preview will look like colored blobs on black. That's correct - it's semantic data, not your video. If you expect to see frames, you're looking at the wrong node.

Where people get burned

Multi-person shots are the classic failure. If you select two people but only one color shows up, the problem is upstream: check the SAM3 detection settings and object indices, not the mask node. And the community has been bitten repeatedly by the flip side - asking for a single-person swap in a busy scene and watching background people pick up outline/glow artifacts because the mask coverage was sloppy. Same root cause: partial or mis-selected mask coverage leaves body regions on the wrong side of the conditioning.

The fix is almost always coverage first: get the full subject into the mask before you touch prompts or SCAIL-2 strength knobs. The colored mask is the contract with the rest of the workflow, and a broken contract can't be patched downstream.

CategorySCAIL-Pose2/SAM3

Inputs (5)

NameTypeDefaultDescription
driving_track_dataSAM3_TRACK_DATASAM3 track of the driving pose video.
object_indicesSTRING
sort_byCOMBOleft_to_right3 options: left_to_right, area, none
ref_track_dataoptSAM3_TRACK_DATAOptional SAM3 track for reference identities. Do not connect when using ref_mask.
ref_maskoptMASKOptional plain MASK for the reference subject. Do not connect when using ref_track_data.

Outputs (2)

NameTypeDescription
pose_video_maskIMAGE
reference_image_maskIMAGE