凤希AI - 视频场景管理 - 进Q群与更多的群友学习:775649071
FxAiSceneManager
- 总行数
- 场景数据
FxAiSceneManager is the scene database for the pack's segment-based long-video flows. Where the loader nodes (FxAiSceneLoad) read one scene at a time, this is where the whole list lives. You paste a JSON description of every scene - duration, prompt, which audio and image indices to use, whether to transition - and it normalizes the lot into a clean LIST of dicts that every other scene node can consume. Think of it as the table of contents for a video that's too long to generate in one pass.
The input is a single lines_data field: multiline STRING holding JSON (default []). It accepts a few shapes on purpose. A plain list of strings becomes scenes with just a prompt ("a cyberpunk alley" → one scene, default 5 seconds, no audio/image). A list of lists maps positionally: [时长, 提示词文本, 音频索引, 图片索引, 尾帧位置, 转场] - so [10.0, "night street", 0, -1, -1, 1] is a 10-second scene using audio file 0, no image, no tail frame, with transition on. Each row gets normalized into a dict with 序号 (sequence number), 时长 (seconds, default 5.0), 提示词文本, 音频索引 (default 0), 图片索引 (default -1), 转场 (transition on/off, default 1), and 尾帧位置 (tail frame, default -1). Missing fields fall back to defaults rather than erroring - it's a tolerant parser, like most of this pack. There's also the standard 刷新标记 (refresh marker) optional input for forcing a re-parse.
The two outputs are 总行数 (INT - how many scenes you defined) and 场景数据 (LIST - the normalized scene objects). That LIST is what you feed to FxAiSceneLoad, which pulls out one scene's fields per loop iteration and hands them to the video pipeline. The 总行数 is genuinely useful for loop control: it's the natural bound for the 循环复用 logic in the loader, so a loop can iterate scenes and wrap cleanly.
It ships with a front-end editor (the 凤希AI menu panel) so you can build the JSON visually rather than hand-writing it, and the display name even points users at the author's QQ group. The gotchas are the parser ones: malformed JSON quietly becomes an empty list (you get 0 scenes, no error), and because this is a JSON text box, one missing comma breaks the whole list - paste carefully, or use the editor panel. There's also a V2 (FxAiSceneManagerV2) that adds an audio-start field and a third 分段时长 output; for basic scene lists, V1 is enough.
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. If you're storyboarding a long video in this pack, this is where the story lives.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| lines_data | STRING | [] | — |
| 刷新标记opt | INT | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 总行数 | INT | — |
| 场景数据 | LIST | — |