Nodes/ComfyUI-GGUF-Loader/LTX-2.3 Speech Batch Selector ⚡
ComfyUI Node

LTX-2.3 Speech Batch Selector ⚡

The tiny node that makes a multi-clip talking head say the right thing

By ChrisColeTech·Created about a month ago·Updated 3 days ago· 10
LTX-2.3 Speech Batch Selector ⚡
    • selected_text
    • count
    batch
    index0

    If you're building an LTX-2.3 talking-head pipeline, this is the node you'll reach for when you realize your captioner wrote twenty speech lines and you only want one of them spoken. It's a one-job utility: take a batch of speech clips, hand back the clip at a given index, plus a count you can loop over. Nothing more, and that's the point.

    Where it lives in the workflow

    This ships in the ComfyUI-GGUF-Loader pack - ChrisColeTech's "CCTech Suite" fork of city96's ComfyUI-GGUF (Apache-2.0), the same pack that loads your GGUF UNet and runs the LTX-2.3 A/V kit. In that world, the companion LTX-2.3 ID-LoRA Prompt Editor splits a captioner's [SPEECH] block into a real comfy list called speech_text_batch - one clip per non-blank line. That list is a weird thing for ComfyUI, which normally fans data out one item per call. This node is built to swallow the whole list in one go, and it's the clean way to then grab a single line and hand it to a TTS node (or the speech_text input of your LTX-2.3 pipeline).

    How it works

    The trick is INPUT_IS_LIST = True, which tells ComfyUI's execution engine to pass the entire batch in one call instead of invoking the node once per item. The trade-off is that every input arrives wrapped in a length-1 list - including index - so the node unwraps it internally before doing the math.

    The index behaves exactly like Python:

    • 0-based, so 0 is the first clip.
    • Negative counts from the end, so -1 is the last clip.
    • Out of range clamps to the nearest valid index instead of erroring. You don't get a traceback for asking for line 99 of a 5-line batch; you get the last line.

    That clamping is a small mercy when you're driving it from a loop that might overshoot.

    The two outputs

    • selected_text (STRING) - the clip at index. Wire this into your TTS node's text input, or into CLIPTextEncode if you're going the pure text route.
    • count (INT) - the total length of the batch. This is the one for automation: feed it into a loop node's iteration-count input and bump index from 0 to count - 1 across iterations to process every line once.

    The inputs you actually set

    Just two:

    • batch - the speech_text_batch list from the ID-LoRA Prompt Editor (or anything else that outputs a real list of strings).
    • index - which clip you want, per the rules above.

    Installing it

    This is a node in the CCTech pack, so install once and you get it along with the whole suite. ComfyUI Manager → Install Custom Nodes → search "ComfyUI-GGUF-Loader" → install → restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ChrisColeTech/ComfyUI-GGUF-Loader
    cd ComfyUI-GGUF-Loader
    pip install -r requirements.txt
    

    Only gguf is strictly required for the pack's core; the rest of requirements.txt covers the optional nodes.

    Common issues

    Honestly, there's not much to trip on here. The one real gotcha is upstream: if you don't feed it a true list - say you hand it a plain string that got converted to a length-1 list - the "batch" is one item and count is 1, and negative indexes do surprising things. Keep the source of batch as the Prompt Editor's speech_text_batch output and the behavior is boring, which is exactly what you want from a selector.

    Category🤖 CCTech/LTX-2.3

    Inputs (2)

    NameTypeDefaultDescription
    batchSTRINGA speech_text_batch list, e.g. from the ID-LoRA Prompt Editor.
    indexINT0-4294967295–42949672950-based; negative counts from the end like Python (-1 = last clip). Out-of-range clamps to the nearest valid index.

    Outputs (2)

    NameTypeDescription
    selected_textSTRING
    countINT