凤希AI - 场景数据加载器
The per-scene unpacker that feeds one segment at a time
- 场景数据
- 时长(秒)
- 提示词
- 音频索引
- 图片索引
- 尾帧位置
- 启用转场
- 场景行索引
FxAiSceneLoad is the read-side of the pack's scene system: it takes the 场景数据 LIST from FxAiSceneManager and an index, and unpacks one scene into every field your video pipeline needs - duration, prompt, audio index, image index, tail-frame position, and a transition flag. It's the node that turns "the list of all scenes" into "the current scene," which is exactly what a loop needs to generate a long video one segment at a time.
Mechanically it's a dict lookup with safety rails. You feed 场景数据 (LIST, forced input from the manager) and 行索引 (INT). The 循环复用 (loop reuse) input controls what happens at the edges: 0 means "if the index is out of range, return defaults," a positive N wraps the index with index % N so a counting loop cycles back through the first N scenes, and 1 pins it to scene 0. It then reads the scene dict's fields - 时长 (seconds), 提示词文本 (which gets wrapped in the optional 通用提示词/尾部通用提示词), 音频索引, 图片索引, 尾帧位置, and 转场 - with sensible fallbacks (duration defaults to 5.0, negative image index resolves to the row index itself). There's also a 默认时长 (default duration) input, used when a row is missing or out of range, so the pipeline gets a sane number instead of a crash.
The seven outputs mirror the scene schema, which is why this node is so convenient: 时长(秒) (FLOAT), 提示词 (STRING), 音频索引 (INT), 图片索引 (INT), 尾帧位置 (INT), 启用转场 (BOOLEAN), 场景行索引 (INT - echoes the resolved index, including after modulo wrap, so downstream bookkeeping knows which scene actually ran). Each wires straight into the pack's audio loaders, image loaders, and frame calculators.
The gotcha is the boundary behavior. An empty or out-of-range index doesn't error - it returns 默认时长, the globals-only prompt, and index echoes with transition forced on. That's friendly for loops but means a bug in your loop (index running past the end with 循环复用 set to 0) silently renders a default scene instead of telling you. Keep 总行数 from the manager in view when you set up the loop. There's also a V2 (FxAiSceneLoadV2) that swaps the schema to audio-start/audio-duration fields and wraps the index to the full list by default - pick the version that matches your manager.
It's under 凤希AI/场景管理, part of fxai-toolkit (凤希AI / fxai.site):
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
or ComfyUI Manager → search "fxai-toolkit", then restart. Manager + Load is the pack's scene stack - this is the node that makes the loop actually march through your story.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| 场景数据 | LIST | — | |
| 行索引 | INT | — | |
| 循环复用 | INT | 0 | — |
| 刷新标记opt | INT | — | |
| 通用提示词opt | STRING | — | |
| 尾部通用提示词opt | STRING | — | |
| 默认时长opt | INT | 15 | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| 时长(秒) | FLOAT | — |
| 提示词 | STRING | — |
| 音频索引 | INT | — |
| 图片索引 | INT | — |
| 尾帧位置 | INT | — |
| 启用转场 | BOOLEAN | — |
| 场景行索引 | INT | — |