🪠️ WWAA Advanced Text Reader
The in-memory twin that cycles lines of pasted text into your prompt
- current_line_text
- current_line_number
- total_lines
- remaining_lines
The WWAA Advanced Text Reader is the version of the Advanced Text File Reader for people who don't want to touch a file system. Instead of pointing it at a .txt file, you paste your multi-line prompt list directly into the node's text_input box, and it walks through one line at a time - forward, reverse, or random - feeding current_line_text into your CLIP Text Encoder. Same state machine, no file path.
It's part of WWAA-CustomNodes from WeirdWonderfulAI.Art. If your prompt variations live in a text widget rather than on disk, this is the cleaner fit: edit the box, and the node reloads automatically because it detects that the input text changed. The file-based version (WWAA_AdvancedTextFileReader) exists for when you want prompts persisted in a real file - say, one produced by the pack's LLM Prompt To Text File node - but for casual batch prompting, pasted text is often the least ceremony.
How it works
On first run it splits text_input into lines, trims each, and remembers its position. Each subsequent run advances: forward walks down and wraps at the end, reverse walks up, random draws without repeating a line until you've seen them all, then reshuffles. skip_lines (0–10) jumps extra lines per step, reset_counter starts over (honoring starting_index), and hold_current_text freezes the current line for a few runs while you inspect the rest of the graph. It reports itself as always-changed, so ComfyUI re-executes it every pass - that's required for the stepping to work.
Outputs are the same quartet as the file reader: current_line_text, current_line_number, total_lines, and remaining_lines. Wire current_line_text into a CLIPTextEncode and each run of the workflow generates from the next line.
Inputs that matter
text_input- paste your multiline list here; edits trigger a reload.traversal_mode-forwardfor normal sequencing.reset_counter- restart from the top (orstarting_index).hold_current_text- keep the line fixed while you debug.
Installing it
It's in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/hgabha/WWAA-CustomNodes
Restart ComfyUI. Or ComfyUI Manager → search "WWAA Custom Nodes" → install → restart. It's under 🪠️ WWAA/String. No models, no extra dependencies declared by the pack.
Gotchas
The same statefulness caveat as its file sibling: rerunning continues from where you stopped, so if your batch seems to start mid-list, hit reset_counter. And note it counts every line you paste including blank ones (the code splits on \n without filtering empties), so if your list has separator blank lines, total_lines will be higher than your actual prompt count. For the rest, it's a paste-and-go prompt cycler - arguably the most approachable node in this string family.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| text_input | STRING | — | |
| traversal_mode | COMBO | forward | 3 options: forward, reverse, random |
| skip_lines | INT | 00–10 | — |
| reset_counter | BOOLEAN | false | — |
| hold_current_text | BOOLEAN | false | — |
| starting_indexopt | INT | 0 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| current_line_text | STRING | — |
| current_line_number | INT | — |
| total_lines | INT | — |
| remaining_lines | INT | — |