Nodes/XB_ToolBox/XB-llama - ๐ŸŽž๏ธ ๅˆ†้•œ่ฏๅค„็†ๅ™จPro
ComfyUI Node

XB-llama - ๐ŸŽž๏ธ ๅˆ†้•œ่ฏๅค„็†ๅ™จPro

Same storyboard gacha, plus it sniffs your characters for you

By wjluoxiaoยทCreated 7 months agoยทUpdated a day agoยท 406
XB-llama - ๐ŸŽž๏ธ ๅˆ†้•œ่ฏๅค„็†ๅ™จPro
  • text_input
  • output_list
  • ่ƒŒๆ™ฏ
  • ่ง’่‰ฒ_1
  • ่ง’่‰ฒ_2
  • ่ง’่‰ฒ_3
โ—„draw_modefalseโ–บ
โ—„draw_rangeๅ…จ้ƒจโ–บ

The Pro version of XB_ToolBox's storyboard shot-selector. It does everything the plain XB_llamaStoryboardProcessor does - same cache, same draw_mode gacha switch, same draw_range dropdown - then adds the bit that makes it actually useful for multi-shot video: it sniffs your storyboard text for background and character tags and hands them to you as separate outputs.

If you've been fighting character consistency across shots, this is the node that makes the "describe the character once, reuse the description every shot" pattern work without copy-pasting.

What Pro adds

Same inputs as the base node: draw_mode, draw_range, and the optional text_input. Same output_list STRING output for the shot prompts. The difference is four extra outputs, all plain STRING:

  • ่ƒŒๆ™ฏ (background)
  • ่ง’่‰ฒ_1, ่ง’่‰ฒ_2, ่ง’่‰ฒ_3 (character 1โ€“3)

It finds them with a non-greedy regex that grabs everything after a ่ƒŒๆ™ฏ[A-E] or ่ง’่‰ฒ[A-E] tag until the next tag or the end of the string. The readme for the node family calls it "sniffing," and that's honestly the right word - it's a text scrape, not an LLM pass, so it costs nothing.

One quirk to know: each sniffed value is truncated to 10 characters. That's deliberate - these outputs are meant to be compact tokens you can feed into a character reference encoder or a LoRA trigger, not full paragraph descriptions. If your character description is "the tall detective with the red coat and the scar," you're getting "the tall d" and it may be useless for what you wanted.

Where the extra outputs go

This is the part that makes Pro worth having. In a short-drama or image-to-video pipeline you typically have a separate path that needs the character identity - an image guide, a reference encoder, a regional conditioning node - and a path that needs the bare shot prompt. The base processor gives you only the second. Pro gives you both from one parse:

  • output_list โ†’ your CLIP/text encoder, per-shot prompts.
  • ่ง’่‰ฒ_1 โ†’ character-consistency conditioning, so shot 3's "detective" is the same detective as shot 1's.
  • ่ƒŒๆ™ฏ โ†’ a background/control path if your workflow separates environment from subject.

The tag format (่ƒŒๆ™ฏA, ่ง’่‰ฒA, ่ง’่‰ฒB...) is what the XB-llama storyboard writer templates emit, so this pairs specifically with the StoryboardEnhancer/StoryboardInstruct chain from the same pack. Feed it raw text from some other source and the regex will often find nothing, which is why the outputs can come back empty.

Install & gotchas

Same pack, same story as its little sibling:

cd ComfyUI/custom_nodes
git clone https://github.com/WJLUOXIAO/XB_ToolBox.git
# or: ComfyUI Manager โ†’ "XB_ToolBox"
pip install llama-cpp-python   # needed for the whole XB-llama family to appear

And the same cache rule applies: run it once with draw_mode off before flipping to gacha mode, or you'll get the "ๆš‚ๆ— ็ผ“ๅญ˜" message instead of shots. If your text uses Scene_N headers instead of ๅˆ†้•œๅ›พ_N, the parse still works but the draw_range dropdown only lists the ๅˆ†้•œๅ›พ names - pick ๅ…จ้ƒจ in that case.

The 10-char truncation is the trap to respect. If you need the full character description for a serious consistency setup, treat ่ง’่‰ฒ_1 as a selector token rather than the whole description, and keep the full text in a separate string node.

CategoryXB-llama

Inputs (3)

NameTypeDefaultDescription
draw_modeBOOLEANfalseโ€”
draw_rangeCOMBOๅ…จ้ƒจ17 options: ๅ…จ้ƒจ, ๅˆ†้•œๅ›พ_01, ๅˆ†้•œๅ›พ_02, ๅˆ†้•œๅ›พ_03, ๅˆ†้•œๅ›พ_04, ๅˆ†้•œๅ›พ_05, +11
text_inputopt*โ€”

Outputs (5)

NameTypeDescription
output_listSTRINGโ€”
่ƒŒๆ™ฏSTRINGโ€”
่ง’่‰ฒ_1STRINGโ€”
่ง’่‰ฒ_2STRINGโ€”
่ง’่‰ฒ_3STRINGโ€”