LTX-2.3 Speech Batch Selector ⚡
The tiny node that makes a multi-clip talking head say the right thing
- selected_text
- count
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
0is the first clip. - Negative counts from the end, so
-1is 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 atindex. Wire this into your TTS node's text input, or intoCLIPTextEncodeif 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 bumpindexfrom 0 tocount - 1across iterations to process every line once.
The inputs you actually set
Just two:
batch- thespeech_text_batchlist 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.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| batch | STRING | A speech_text_batch list, e.g. from the ID-LoRA Prompt Editor. | |
| index | INT | 0-4294967295–4294967295 | 0-based; negative counts from the end like Python (-1 = last clip). Out-of-range clamps to the nearest valid index. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| selected_text | STRING | — |
| count | INT | — |