ComfyUI Node

FL Load CSV

Get a CSV file into your ComfyUI graph

By filliptm·Created 3 years ago·Updated about 17 hours ago· 628
FL Load CSV
    • csv_data
    • row_count
    csv_path

    Small, unglamorous, and genuinely useful if your workflow is data-driven rather than one-shot: FL_LoadCSV reads a CSV file off disk and hands it into your graph as data the rest of Fill-Nodes' captioning tools can use. It lives in the pack's Captioning section for a reason - the typical use is a spreadsheet mapping image filenames to captions, or a list of prompts you want to iterate over, and this is the node that gets that spreadsheet in.

    How it works

    Point it at a file path. It validates the file exists and actually has a .csv extension before doing anything else, then reads the raw bytes and counts the rows. It also tracks the file's modification time internally - which matters more than it sounds like: if you edit the CSV on disk and re-run the workflow, ComfyUI's caching would otherwise happily reuse the old cached output because the node's inputs (the path string) didn't change. Tracking mtime is what lets the node notice the file itself changed and re-read it instead of serving you stale data.

    The inputs and outputs that matter

    • csv_path - the only input, a plain string path to your .csv file. There's no browse dialog here; you type or paste the path.
    • csv_data (CSV) - the raw content, in a Fill-Nodes-specific type. This isn't a generic ComfyUI type - it only means something to other Fill-Nodes nodes built to consume it, like FL_CSVExtractor (which pulls a specific column from a randomly-selected row) or FL_SaveCSV (which writes CSV bytes back to disk).
    • row_count (INT) - how many rows were in the file. Useful as a sanity check, or to drive a loop/index elsewhere in the graph without hardcoding a number.

    That's the whole node. It's a loader, not a parser - the actual "pull column X from row Y" logic lives downstream in whatever consumes csv_data.

    How to install it

    Via ComfyUI Manager: search "ComfyUI_Fill-Nodes" and install it, or clone manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
    

    then restart ComfyUI. This particular node needs nothing beyond Python's standard CSV handling - no extra model downloads, no heavy library. Fill-Nodes as a whole is a large, wide-ranging pack from one prolific solo author (filliptm) that also includes PDF tools, image FX, and GPT/Gemini/Fal API wrappers; those other groups carry their own dependencies, this one doesn't need them.

    Common issues & troubleshooting

    "File not found" even though the file exists. ComfyUI custom nodes run relative to wherever the Python process was launched, not necessarily your working folder in a terminal - use an absolute path if a relative one isn't resolving the way you expect.

    Edits to the CSV don't seem to show up. This is exactly what the mtime tracking is meant to prevent, but if you're still seeing stale data, double-check you actually saved the file (some editors autosave to a temp file first) and that the workflow re-executed rather than pulling a cached run from ComfyUI's own history.

    Wrong extension gets rejected. The node validates for .csv specifically - if your data is a .tsv or has no extension at all, rename it first; there's no format-sniffing fallback.

    Category🏵️Fill Nodes/Captioning

    Inputs (1)

    NameTypeDefaultDescription
    csv_pathSTRING

    Outputs (2)

    NameTypeDescription
    csv_dataCSV
    row_countINT