Nodes/fxai-toolkit/凤希AI - 提示词管理 - 提示词加载
ComfyUI Node

凤希AI - 提示词管理 - 提示词加载

Load the right prompt for the right shot, without editing the graph

By fxai666·Created 4 months ago·Updated 4 days ago· 35
凤希AI - 提示词管理 - 提示词加载
    • 提示词内容
    • 当前提示词路径
    • 总提示词数量
    提示词文件夹路径
    提示词索引0
    刷新标记

    FxAiLoadPromptByIndex (凤希AI - 提示词管理 - 提示词加载) solves the classic long-video annoyance: you've got forty shots, each needs its own prompt, and you refuse to build forty text-encode nodes. This node loads a prompt from a folder of .txt files by index, and when you loop the same graph over a segment counter, each segment automatically picks up its own script. One graph, forty scenes, zero editing between runs. It's the prompt-management half of the same "load by index" family as the image and audio versions, and it's the glue that makes multi-scene story workflows actually pleasant.

    The mechanism is as straightforward as the family gets: scan the folder for .txt files, sort by filename, pick 提示词索引 % total, read the contents. Filename order is your API - name files 01_establishing.txt, 02_closeup.txt, and so on, and the sort gives you your scene order for free. There's no parsing, no templating, no hidden magic; you get the file's text out the other end.

    The inputs:

    • 提示词文件夹路径 - the folder of .txt prompts.
    • 提示词索引 - which prompt, starting at 0.
    • 刷新标记 (optional) - force-input INT; when its value changes the node re-scans, so a fresh file in the folder shows up without a restart.

    Outputs: 提示词内容 (STRING), 当前提示词路径 (STRING), and 总提示词数量 (INT). The count is the one worth wiring - it's your loop bound, so a loop runs exactly once per prompt file. Path goes to logging or downstream filename logic if you want it.

    Install is pack-standard: ComfyUI Manager, search "fxai-toolkit", or cd ComfyUI/custom_nodes && git clone https://github.com/fxai666/fxai-toolkit and restart. The pack self-installs soundfile and psutil, needs FFmpeg for the audio/merge paths, and - the recurring surprise - every UI label is Chinese, because 凤希AI builds for a Chinese-speaking community (QQ group 775649071, Bilibili). Recognize it by the 提示词 category and move on.

    Real-world gotchas: only .txt counts, so a folder of .md or .json prompt files loads nothing (the node raises "未找到有效文件" if the folder ends up empty). And since the node just dumps file text into a string, a stray newline or BOM at the top of a file will ride along into your positive conditioning - keep prompt files clean if you want clean results. Beyond that it's the most reliable node in the pack: folder in, string out, nothing to break.

    Category凤希AI/提示词

    Inputs (3)

    NameTypeDefaultDescription
    提示词文件夹路径STRING
    提示词索引INT0
    刷新标记optINT

    Outputs (3)

    NameTypeDescription
    提示词内容STRING
    当前提示词路径STRING
    总提示词数量INT