Nodes/fxai-toolkit/凤希AI - 选择角色
ComfyUI Node

凤希AI - 选择角色

One node that hands you your character's face, voice, and bio at once

By fxai666·Created 4 months ago·Updated 4 days ago· 35
凤希AI - 选择角色
    • 图片
    • 参考音色
    • 音频
    • 名称
    • 描述
    角色头像

    Character consistency across a multi-scene video needs three anchors: a face, a voice, and a description to keep the prompt on target. FxAiCharacterSelector (凤希AI - 选择角色) is where all three arrive in the graph at once. Pick a character from the pack's database and it outputs their portrait, their full voice audio, a trimmed voice reference, their name, and their description - everything downstream needs to keep that character the same character from scene one to scene fifty. It's the runtime half of the pack's cast-list system, matching FxAiCharacterProfileManager's storage.

    How it works

    The visible input, 角色头像 (character avatar), is a STRING with a hidden layout - a small picker on the node fills it in for you, same trick as the image selector. When the node runs it looks that avatar path up in the character database (fxai.db), and if there's a match:

    • Loads the avatar image as 图片.
    • Loads the character's stored voice file as 音频 (audio).
    • Cuts the first 10 seconds as 参考音色 (reference voice) - the short clip meant for voice-cloning/reference inputs that want a sample, not the whole file.
    • Passes through 名称 (name) and 描述 (description) so you can wire the character's bio straight into your prompt templates.

    Five outputs, one character. It always re-runs, so switching characters mid-project is just a picker change and a re-queue.

    Where it fits

    This is the node that makes the pack's short-drama (短剧) pitch work: define each character once - portrait, voice, description - then select per scene. In a dialogue scene you'd wire the avatar into a reference-image adapter (or a character-consistency-aware video model), the reference voice into your TTS/voice-clone step, and the description into the CLIP text encode. The voice side is the part you won't find in most character-consistency stacks, and it's the reason the selector is more than a glorified image loader.

    Install

    Part of fxai-toolkit (凤希全能节点包), MIT-licensed, by 凤希AI. ComfyUI Manager (search "fxai") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fxai666/fxai-toolkit
    # restart ComfyUI
    

    Pack auto-installs soundfile and psutil; no models. Audio loads through the pack's ffmpeg-backed loader, so keep ffmpeg on PATH if your voice files aren't already wav.

    Gotchas

    • No match = empty outputs. If the avatar isn't in the database (or the lookup path doesn't match exactly), the node returns a blank image and empty strings rather than an error. If your character "vanishes," it's a path mismatch - re-select in the manager.
    • The reference voice is a hard 10-second cut from the start of the file. If your voice file opens with silence or noise, the reference clip inherits it.
    • Like every panel-backed node in this pack, the picker needs a hard refresh (Ctrl+Shift+R) after install to appear.
    • All labels are Chinese: 角色 = character, 参考音色 = reference voice, 描述 = description.
    Category凤希AI/角色

    Inputs (1)

    NameTypeDefaultDescription
    角色头像STRING

    Outputs (5)

    NameTypeDescription
    图片IMAGE
    参考音色AUDIO
    音频AUDIO
    名称STRING
    描述STRING