ComfyUI Node
Prompt Writer · Text File Loader
A ComfyUI node in Prompt Writer with 5 inputs and 4 outputs.
Prompt Writer · Text File Loader
- text
- filename
- file_path
- total_files
◄folder_pathD:/captions►
◄index0►
◄pattern*.txt►
◄include_subfoldersfalse►
◄loop_at_endfalse►
CategoryPrompt Writer
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| folder_path | STRING | D:/captions | Folder to load text files from. Any drive, absolute path. Files are sorted naturally (file2 before file10). |
| index | INT | 00–999999 | Which file to load (0 = first). Set the control below to 'increment' and queue a batch count equal to the number of files - each run loads the next file automatically. |
| pattern | STRING | *.txt | Filename filter, e.g. *.txt for all text files or pose_*.txt for a specific subset. |
| include_subfolders | BOOLEAN | false | Also search all subfolders of folder_path. |
| loop_at_end | BOOLEAN | false | When the index passes the last file, wrap around to the first instead of stopping with an error. Useful for endless wildcard-style cycling through scene ideas. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| filename | STRING | — |
| file_path | STRING | — |
| total_files | INT | — |