凤希AI - 场景提示词加载器
FxAiMultiLineTextLoad
- 提示词数据
- 提示词
- 行索引
FxAiMultiLineTextLoad is the "pick one prompt from a list" node at the heart of this pack's segment-based video flows. The idea is simple: you've got a storyboard or a list of scene prompts - one per shot, per segment, per loop iteration - and you need to feed one of them into the sampler each run, in order. This node takes that list, an index, and hands back the matching line. It's the prompt-side counterpart to FxAiSceneLoad, which does the same trick for whole scene objects.
Mechanically it's a straight list lookup. You feed 提示词数据 (a LIST of prompt strings, marked forceInput so it has to come from another node rather than being typed), and a 行索引 (row index, also forced input - drive it with a counter node in a loop). The 循环复用 (loop reuse) input is where the loop logic lives: set it to 0 for a plain "if the index is out of range, bail out" mode, or set it to a positive number N and the index wraps with index % N, so a loop that counts forever cycles back through the first N rows instead of crashing. Set it to 1 and every row reads index 0. The two optional string inputs, 通用提示词 (global/prefix prompt) and 尾部通用提示词 (trailing prompt), get glued around the selected line - that's how you keep a consistent style directive on every segment while swapping only the scene-specific text.
Outputs: 提示词 (the assembled STRING - prefix + selected line + suffix, or just the globals if the index is out of bounds) and 行索引 (the INT index you fed in, echoed back). The index output matters more than it looks: in loop workflows you can feed it forward into downstream bookkeeping nodes so everything agrees on which segment it just rendered.
A couple of gotchas from reading the source. If 提示词数据 arrives empty, you get the globals back rather than an error - good default, but it means an empty list silently produces a prompt with no scene text, so check your upstream generator. And the index-boundary behavior is worth knowing: an out-of-range index returns the globals-only prompt instead of erroring, which is friendlier than crashing but can mask a bug where your loop runs past the end of your list.
It lives in the 凤希AI/图片 menu and installs with the whole fxai-toolkit pack by 凤希AI (fxai.site):
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
or ComfyUI Manager → search "fxai-toolkit". Restart, and it'll show up under 凤希AI. The pack auto-installs soundfile and psutil on first boot. If your workflow already has a storyboard list, this is the node that turns "a list" into "the right line, right now".
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| 提示词数据 | LIST | — | |
| 行索引 | INT | — | |
| 循环复用 | INT | 0 | — |
| 刷新标记opt | INT | — | |
| 通用提示词opt | STRING | — | |
| 尾部通用提示词opt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 提示词 | STRING | — |
| 行索引 | INT | — |