凤希AI - 首尾帧生成器V2
The first/last-frame node that stops chained videos from jumping cuts
- 图片序列
- 过渡帧
- 首帧图
- 尾帧图
The reason long AI video dies on normal GPUs is that you can't generate a 3-minute clip in one pass without the VRAM vanishing. The fix everyone lands on is segmentation - generate ten-second chunks and stitch them - and the moment you do that, you discover the real problem: chunk 2 has no idea what chunk 1 looked like, so the picture blinks and the character changes face. FxAiFrameGeneratorV2 is this pack's answer to that. It produces the first-frame / last-frame anchor pair each segment needs, so the next chunk can start from where the last one ended.
It's a "首尾帧" (first-last frame) node: it makes the two keyframes that anchor a segment of video generation, and it's meant to sit in the chain before whatever image-to-video model you're using (LTXV, MiniMax H3, a start/end-frame Vidu-style pipeline - the pack has dedicated nodes for the H3 path). You don't use it to make pixels you keep; you use it to hand the next sampler a consistent starting point.
How it works
Point it at a folder of stills with 文件夹路径 and give it 首帧索引 and 尾帧索引. It lists the image files, picks the frames at those indices (modulo the total, so an out-of-range index wraps around instead of erroring), and resizes them to 输出宽度 × 输出高度, center-cropping as needed. Straightforward.
The interesting part is 启用转场 (enable transition) and the optional 图片序列 input. When both are on, the "first frame" stops being a folder image and becomes the tail of a previous segment's output sequence - the last 过渡帧数 frames (default 9). That's the continuity trick: the next segment opens by re-generating a few frames it already knows, so the join is a smooth carry-over instead of a hard cut. Flip 启用转场 off and it just reads two stills from the folder.
Inputs and outputs that matter
- 文件夹路径 - the directory of source images. If it doesn't exist, the node silently returns nothing.
- 首帧索引 / 尾帧索引 - which stills to use as anchors when not carrying over.
- 启用转场 - the carry-over switch described above.
- 输出宽度 / 输出高度 - target resolution, minimum 64, and the only reason your anchors get resized at all.
- 过渡帧数 (optional) - how many frames of the previous segment to carry.
The three IMAGE outputs are 过渡帧 (the carried tail / transition batch), 首帧图 (the real single first frame - the last of that tail), and 尾帧图 (the end anchor). Wire 首帧图 and 尾帧图 into your first/last-frame sampler; feed the carried tail back into the next loop iteration.
Installing it
This is one node in the fxai-toolkit pack (author 凤希AI, MIT licensed). ComfyUI Manager → search "fxai-toolkit" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
# restart ComfyUI
No models needed for this node. The pack auto-installs soundfile and psutil via pip on first load, so keep your Python environment writable. Docs are in Chinese, and support happens through the author's QQ group (775649071) and Bilibili channel, not Reddit - you won't find much English-language discussion of this one.
Where people get burned
The silent-failure bit is the one that'll cost you an hour: if the folder path is wrong, the node returns (None, None, None) and your downstream sampler just gets nothing, no error. Also remember the outputs are resized to whatever you set - feed a 540×960 anchor into a model expecting a different aspect and you'll get stretch artifacts downstream, so set 输出宽度/高度 to match your generator. And the transition carry-over only works if you actually feed the previous segment's tail into 图片序列 - skip that wire and 启用转场 buys you nothing.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| 文件夹路径 | STRING | — | |
| 首帧索引 | INT | 0 | — |
| 尾帧索引 | INT | 1 | — |
| 启用转场 | BOOLEAN | true | — |
| 输出宽度 | INT | 540 | — |
| 输出高度 | INT | 960 | — |
| 图片序列opt | IMAGE | — | |
| 过渡帧数opt | INT | 9 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 过渡帧 | IMAGE | — |
| 首帧图 | IMAGE | — |
| 尾帧图 | IMAGE | — |