凤希AI - 视频生成V4
The generator that auto-derives your transition frames
- 图片序列
- 音频
- 过渡帧引导
- 视频帧序列
- 过渡帧
- 视频文件路径
- 保存目录
- 实际帧数
FxAiVideoGeneratorV4 ("凤希AI - 视频生成V4") is the current top of the generator line, and its one new input - 总帧数 - solves the fiddliest problem in the transition-frame system: how many frames should actually be transition vs. content. Previous versions made you hardcode 过渡帧数 and hope. V4 lets you pin the target content length and computes the transition count for you.
The one new thing that matters
总帧数 (INT, default 0) means "this is how many frames the video content should be." When it's greater than 0, the node sets:
过渡帧数 = max(总帧数序列 - 总帧数, 过渡帧数)
In plain words: if your generated sequence is longer than the target, the surplus is treated as transition frames. So you can tell the model "give me a 150-frame segment" and, no matter how many frames the sampler actually produced, the node carves the right amount off the end as handoff material. Set it to 0 and it behaves exactly like V3 - 过渡帧数 does the work as before.
That's a genuinely good workflow fix. In segmented generation, frame counts drift - a sampler returns 158 frames when you asked for 150, and a hardcoded 过渡帧数 of 1 means the video ends up 157 frames of content plus 1. Every segment, that tiny drift compounds until the audio and video fall out of sync by the end of a long run. V4 is the correction valve.
Everything else
Identical to V3 otherwise: required 图片序列 (IMAGE), 音频 (AUDIO), 目录 (default "sucai"), 帧率FPS (24), 视频序号 (-1 = auto-number); optional 总帧数, 过渡帧数, 过渡帧引导 (IMAGE), 视频帧序列 (IMAGE). Outputs: 过渡帧 (IMAGE), 视频文件路径 (STRING), 保存目录 (STRING), 实际帧数 (INT). Same ffmpeg encode, same del/gc.collect()/CUDA-cache memory cleanup, same yuv420p output.
Which one should you use?
If you're building a new segmented workflow today, use V4. It's a strict superset of V3's behavior, it drops into the same wiring, and the auto-derived transition count removes the most common source of frame-drift bugs. V2 is still fine for a quick single render; there's no reason to start a long loop on anything older than V4. The four generations are a genuinely useful case study in how this pack evolved - from "frames in, mp4 out" to "audio required, video-frames accepted, memory-aware, and self-correcting."
Install and caveats
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
Restart ComfyUI, or use ComfyUI Manager and search "fxai-toolkit". System ffmpeg required; stderr is suppressed, so a missing or broken ffmpeg returns an empty path with no error - check ffmpeg -version first. One subtlety: 总帧数 refers to content frames after transition stripping, so if you wire 总帧数 from your segment calculator, use the aligned content count (e.g. what FxAiSegmentTotalFrames returns before its own +1 convention).
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| 图片序列 | IMAGE | — | |
| 音频 | AUDIO | — | |
| 目录 | STRING | sucai | — |
| 帧率FPS | INT | 24 | — |
| 视频序号 | INT | -1 | — |
| 总帧数opt | INT | 0 | — |
| 过渡帧数opt | INT | 1 | — |
| 过渡帧引导opt | IMAGE | — | |
| 视频帧序列opt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| 过渡帧 | IMAGE | — |
| 视频文件路径 | STRING | — |
| 保存目录 | STRING | — |
| 实际帧数 | INT | — |