Nodes/ComfyUI-GiftHelperSuite/Gift Frame Slice · 帧切片
ComfyUI Node

Gift Frame Slice · 帧切片

Cutting a frame range out of a sequence, the way you actually mean it

By lingziwyh·Created 5 months ago·Updated 12 days ago· 7
Gift Frame Slice · 帧切片
  • images
  • images
start_frame0
end_frame10

GiftFrameSlice is the utility node you don't think about until you need it ten times in one session: it takes an IMAGE batch (a frame sequence) and returns a slice of it. That's the whole job. The reason it's worth having over hand-rolling the same thing is in the details - this thing is deliberately forgiving where naive slicing is not.

The inputs are exactly what you'd expect: images, start_frame, and end_frame. Two behaviors stand out once you read the source. First, end_frame is inclusive - a range of 0 to 10 returns 11 frames. That trips up people who assume Python half-open semantics, and it's the convention video people actually use, so it's the right call. Second, out-of-range and reversed frames are handled instead of erroring: values are clamped to the batch, and if you pass start_frame > end_frame, it swaps them rather than blowing up. Sloppy inputs, sane output.

When you'll reach for it

This is squarely in the "sequence housekeeping" lane the suite exists for. You generated a 96-frame gift animation and want frames 20–40 for a tight loop; you need a handful of frames to test a chroma key without keying the whole clip; you're slicing a sequence to build a specific timing. Combined with GiftMaskRamp and GiftMaskBlend, it's the toolkit for turning one long generated sequence into several purposeful ones.

The migration note

If you've used the older standalone ComfyUI-mask-blend* plugins, this node replaces FrameSliceNode - the suite kept new Gift* IDs on purpose so the old and new can coexist during migration. Update old JSON workflows by swapping the node type FrameSliceNodeGiftFrameSlice. Just don't keep both old ComfyUI-mask-blend* folders installed; they register duplicate generic IDs with each other and will fight.

Install: ComfyUI Manager (search "ComfyUI-GiftHelperSuite") or git clone https://github.com/lingziwyh/ComfyUI-GiftHelperSuite.git into custom_nodes, then restart. No pip dependencies, no models. About as low-stakes as a ComfyUI install gets, and about as simple as a node gets - if you've ever been confused about off-by-one frame counts, this is the fix.

CategoryGiftHelperSuite/Sequence

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
start_frameINT00–100000
end_frameINT100–100000

Outputs (1)

NameTypeDescription
imagesIMAGE