Simple CSV Parser
Read prompts from a CSV so you stop hand-typing 100 rows
- positive_prompt
- negative_prompt
- total_rows
- total_rows_string
You've got a spreadsheet of prompts - fifty lines of "what if this character, in this scene" that you want to run through ComfyUI while you go get coffee. Hand-pasting each row into a CLIP Text Encode node is misery. The Simple CSV Parser is the fix: a tiny utility node that reads a CSV file and hands your workflow one row's positive (and optional negative) prompt at a time. It's not clever and it's not flashy. It just kills a genuinely annoying manual chore, and that's exactly what the plumbing layer of ComfyUI is for.
People hit this need constantly - "batch running prompts from csv file" is a recurring r/comfyui question, and this node is one of the small tools built to answer it.
How it works
Point it at a CSV, give it an index, and it returns that row's prompts. The file can live in two places, and the node auto-detects which you mean:
csv_from_folder- a dropdown of every.csvfile sitting in ComfyUI'sinputfolder.csv_custom_path- a full path to a file anywhere on disk. Leave this empty to use the dropdown; if you fill it in, it silently wins. You can use~for your home directory.
The CSV should be two columns: positive prompt first, negative prompt second. Wrap any prompt that contains commas in double quotes, or the CSV reader will split it mid-sentence. A header row is optional - the node skips it automatically if the first cell is positive, positive_prompt, or prompt (case-insensitive). Anything else in that first cell - say a header named pos or subject - counts as data, so your first "row" will be that header text.
Index is 0-based: 0 is the first real row after any header. The node reads one row per run, not the whole file at once, so think of it as a single "read a prompt" node - you drive the rest of the batching yourself.
The inputs and outputs that matter
Four inputs, and honestly only two of them need your attention:
index- which row to read. This is the knob you animate to step through the file, and it's also how you loop: wire a counter in, or bump it by hand each run.use_negative_prompt- on by default. Flip it off if your CSV has no negative column and you don't want the empty string polluting your graph.
The outputs are where this gets useful for automation:
positive_promptandnegative_prompt(STRING) - wire these into your CLIP Text Encode nodes.total_rows(INT) - total data rows in the file. This is the loop-stop signal: when your index reaches it, you're done.total_rows_string(STRING) - the same number as text, for ShowText-style nodes.
One genuinely handy behavior: if index goes past the last row, the node doesn't crash. It hands you an error message in the positive_prompt slot plus the real total_rows, so a loop can detect "we're done" without ComfyUI throwing a fit.
Installing it
The usual two ways:
- ComfyUI Manager - search for "Simple CSV Parser" (or the pack title,
ComfyUI-SimpleCSVParse) and install. - Manual clone:
cd ComfyUI/custom_nodes/
git clone https://github.com/content-and-code/ComfyUI-SimpleCSVParse
Then restart ComfyUI. There's a real upside to this one: it has zero dependencies. No requirements.txt, no models to download, no pip install step - it's pure Python stdlib (csv, os) plus ComfyUI's built-in folder handling. Install it and it just works. About the only requirement is that new CSV files you drop in input won't show up in the dropdown until the node is (re)created, so reload the workflow after adding a file.
Where people get burned
The traps here are small but real:
- Commas in prompts are the #1 footgun. Unquoted,
"a red, fluffy cat, looking sad"becomes three columns and your negative prompt vanishes. Quote it. - Files saved by Excel with a UTF-8 BOM won't have their headers detected, because the node reads strict UTF-8 and the BOM sneaks into the first cell. If your first "row" looks like a header, that's why.
- The dropdown isn't a file picker. It only lists CSVs already in
input/. If you can't find your file, that's the first thing to check - and note the README's drag-and-drop intoinputis the intended path.
It's a narrow tool, but for a prompts-from-spreadsheet workflow it's the one I'd reach for: no bloat, no dependencies, and it plays nicely with a simple counter for unattended runs.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| csv_from_folder | COMBO | 1 options: | |
| csv_custom_path | STRING | — | |
| index | INT | 00–10000 | — |
| use_negative_prompt | BOOLEAN | true | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |
| total_rows | INT | — |
| total_rows_string | STRING | — |