Frames Concat Masks
Stitching per-frame masks into RES4LYF's temporal mask
- frames_0
- frames_1
- frames_2
- frames_3
- frames_4
- frames_5
- frames_6
- frames_7
- frames_8
- frames_9
- temporal_mask
RES4LYF's headline video trick - mentioned right in its own README - is temporal conditioning: unlimited zones, and the ability to change your prompt on a frame-by-frame basis, currently supported on WAN. To pull that off, the sampler needs one combined mask that tells it which frames belong to which zone across the whole clip. Frames Concat Masks is how you build that combined mask: you feed it one MASK per frame (or per chunk of frames), and it stacks them, in the order you plugged them in, into a single temporal_mask.
Think of it as assembling a per-frame timeline out of individual pieces. If you're hand-crafting a 6-frame sequence where frames 0-2 belong to one conditioning zone and frames 3-5 belong to another, you'd draw or generate six individual masks and concat them here in order - frame 0 first, frame 5 last - rather than trying to author one giant mask that already has the right shape.
Inputs and output
frames_0andframes_1(MASK) - required. The minimum is two frames; below that there's nothing to concatenate.frames_2throughframes_9(MASK) - optional, for up to ten frames in a single node.- Output:
temporal_mask(MASK) - the stacked result, which feeds into whatever regional/temporal conditioning setup you're driving (typically alongside the WAN sampler chain the README's temporal conditioning section describes).
Because the output type is the same MASK type the inputs take, you can chain a second Frames Concat Masks node past ten frames - feed the first node's temporal_mask output into one of the second node's frames_N slots and keep appending. It's not spelled out anywhere in the pack's docs, but it follows directly from the types matching.
Installing it
It ships inside the RES4LYF pack, not standalone:
- ComfyUI Manager - search "RES4LYF," install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF, thencd RES4LYF && pip install -r requirements.txt, restart.
Nothing to download beyond the pack itself.
Common issues
Order got scrambled. This node has no explicit frame-index parameter - the order you wire masks into frames_0 through frames_9 is the frame order in the output. If your zones show up on the wrong frames, it's almost always because a slot got plugged in out of sequence, not because the node did anything unexpected.
Mismatched shapes. Concatenation assumes every mask you feed in has a consistent resolution. If one frames_N mask came from a different source image size than the rest, expect an error or a garbled stack rather than automatic resizing - RES4LYF doesn't document auto-resize behavior here, so it's safest to generate or resize every input mask to match before wiring them in.
Nothing changes downstream. The mask this node produces only matters if something is actually consuming temporal_mask - check that your regional/temporal conditioning node is wired to it, and that your model and workflow are actually WAN, since the README scopes temporal conditioning to that family specifically.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| frames_0 | MASK | — | |
| frames_1 | MASK | — | |
| frames_2opt | MASK | — | |
| frames_3opt | MASK | — | |
| frames_4opt | MASK | — | |
| frames_5opt | MASK | — | |
| frames_6opt | MASK | — | |
| frames_7opt | MASK | — | |
| frames_8opt | MASK | — | |
| frames_9opt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| temporal_mask | MASK | — |