Mask Frame Skipping
Skip the first N masks — and quietly invert every one that's left
- masks
- MASK
Mask Frame Skipping is the mask twin of the pack's Frame Skipping node: give it a batch of masks and a skip count, and it drops the first N, keeping the rest. Same family, same origin story - the pack author needed the first 16 frames handled differently to avoid animation overlap, and the masks had to stay in lockstep with the images or the whole workflow errors out.
But here's the thing the README doesn't tell you, and you'll want to know it before your first run: this node does not just skip. It also inverts every mask it keeps. Look at the source and there it is - after the slice, each remaining mask gets 1.0 - mask applied, then they're stacked back up. White masks come out black, black come out white. The README describes it as "skips the first n mask frames," full stop, so the inversion is easy to discover the hard way: you wire in white masks expecting white masks, and everything downstream suddenly sees black.
Is it a bug? Unclear. It might be intentional - the author's original workflow may have needed the masks flipped after the skip, and it got baked in. Either way it's the behavior, and it's consistent in the current release, so plan around it. If you don't want inversion, feed masks of the opposite color to begin with, or add a mask-invert node downstream to flip them back. The whole point of the pack is keeping image and mask counts in sync, so treat this node's output as "the tail, flipped" and wire accordingly.
Mechanically the rest is straightforward. Inputs are masks (a MASK tensor) and skip_count, an integer capped at 100. It slices off the first skip_count masks, then does the inversion dance on what's left. If skip_count is greater than or equal to the total mask count, it returns an empty tensor - the same silent-failure shape as the image-side Frame Skipping, so check your counts if output disappears. The output is a MASK tensor, wired back into whatever's consuming masks downstream, kept matched to the image frames you kept on the image side.
In practice this is a node you use only in the specific "split the head off and process it separately" workflow the whole pack is built around. Slice the images and the masks the same way, skip both the same way, and they stay in sync. Just remember the inversion when you're debugging why your masks all flipped - that's the one that'll cost you an afternoon.
Install is the pack standard: ComfyUI Manager → search "ComfyUI-FrameSkipping", or git clone https://github.com/baicai99/ComfyUI-FrameSkipping into custom_nodes, then restart. No dependencies, no models - the whole pack runs on plain torch, and there's no requirements.txt to fight with.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | — | |
| skip_count | INT | 00–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |