Text Batch Loader
Read every prompt in a folder at once
- texts
- filenames
You've got forty .txt files of prompts - a paragraph each - and you want every one of them run through the same workflow. That's the whole job of Text Batch Loader: it turns a folder of text files into one ComfyUI list and keeps the filenames attached, so you always know which result came from which file.
It's part of a small six-node pack, comfyui_video_BC, from the same author as Video Combine and Video Sequence Processor. On the canvas it sits under BC/Text alongside its siblings (Indexer, Replace, Saver). There's nothing clever under the hood - it lists the folder, filters for .txt (case-insensitive), sorts the files alphabetically, and reads each with UTF-8. No model, no API, no downloads. Simple is the selling point.
The single input that matters is folder_path, and here's the gotcha that catches everyone once: it's a raw OS path, not relative to ComfyUI/input. The default is empty, so you have to type an absolute path like /home/you/prompts/ or C:\Users\you\prompts. Leave it empty and you get two empty lists back. Give it a path that doesn't exist and you get the same - silently. This is one of those nodes where "nothing happened" almost always means "the path was wrong."
Outputs:
texts(LIST) - each file's contents, in filename order.filenames(LIST) - the matching file names, same order. Keep these two wired together; they're aligned by index.
If one file refuses to read, the loader doesn't die. It slots Error: <reason> into that position of texts and carries on with the rest. So when something looks wrong mid-batch, check the console and your filenames list, not just the text.
Install (shared by the whole pack): ComfyUI Manager → search "ComfyUI Video BC" (or "video BC") → install → restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/JioJe/comfyui_video_BC, then restart ComfyUI. The pack's requirements are opencv-python, numpy, torch, and Pillow - you already have numpy/torch/Pillow, and opencv is only used by the video half. For a text-only workflow the install is painless, and there are no model files to fetch.
Where does the list go from here? Straight into Text Batch Replace if the batch needs cleaning, Text Batch Indexer if you want to pull items out one at a time, or any node with a LIST input. ComfyUI's built-in string nodes mostly work on single strings, so this loader and its siblings are what you reach for when the thing you want to vary is an entire folder of files.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_pathopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| texts | LIST | — |
| filenames | LIST | — |