CSV Parser
Get Your Spreadsheet Data Into the Graph
- rows
- dict_list
- headers
Ever sat there with a nice CSV of prompts, LoRA names, or dataset rows and no clean way to feed it into your workflow? That's the gap this node fills. ComfyUI will happily take a text file's contents as a string, but turning those contents into a real list you can iterate over takes a parsing step - and that's exactly what CSV Parser does. It's one of the quiet workhorses of the TinyBee pack: nothing flashy, just turns CSV text into rows, a list of dicts, and the header names.
How it works
The node is a thin wrapper around Python's built-in csv module. You feed it the raw CSV text, it parses it into rows, and then does something slightly clever with the structure:
has_headers(default on) - if your first row is a header row, it's pulled out and used to name the columns. If it's off, headers become plain"0","1","2"index labels.delimiter(default,) - the column separator. Set it to;or tab if your file isn't comma-delimited. Only the first character is used, so keep it to a single character.csv- the actual text. Wire this from a Load Text / Load String From File node (TinyBee has one of those too, same pack).
Three outputs come out:
rows- each row as a string, cells re-joined with your delimiter. This is the one to feed into list nodes if you just need "one entry per line."dict_list- the useful one. Every row becomes an object keyed both by its header name and by its 0-based column index. Missing cells come back as empty strings, so your keys don't explode when a row is short.headers- just the column names as a list.
The mechanism is worth knowing about because it explains the fallback behavior: if csv.reader throws (say, a multi-char delimiter), the node silently falls back to splitting each line on the delimiter itself. You get output either way, which is friendlier than a hard crash, but it also means weird quoting can slip through without you noticing.
Where you'd actually use it
This is a batch-workflow staple. Load a CSV of prompt variations, pipe dict_list into dictionary nodes (TinyBee's Dictionary Lookup pairs nicely here), and drive a loop over rows. Dataset folks also use it to read label files before feeding image + text pairs into a training setup, though for that the dict_list output matters more than the raw rows.
Installing it
This ships in ComfyUI-TinyBee (author: TinyBee). The easy route:
- Open ComfyUI Manager → Install Custom Nodes.
- Search for "ComfyUI-TinyBee" and hit Install.
- Restart ComfyUI.
Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee
Restart ComfyUI. No models to download, and the dependencies are trivial: the pack's requirements.txt lists pillow and jsonata, and Pillow already ships with ComfyUI. jsonata is only actually used by the pack's JSON Parser node anyway, so CSV Parser needs nothing beyond the standard library.
Gotchas
The pack's README is badly out of date - it documents maybe seven of the ~90 nodes, and CSV Parser isn't among them. Don't judge the pack by the README; the code is the real spec. One more thing: the rows output preserves your original rows verbatim (including the header row if you set has_headers). If you iterate rows expecting data-only, you'll get the header row as your first entry. Use dict_list or slice rows when you only want the data.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| csv | STRING | — | |
| has_headers | BOOLEAN | true | — |
| delimiteropt | STRING | , | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| rows | STRING | — |
| dict_list | OBJECT | — |
| headers | STRING | — |