ComfyUI Node

FL Save CSV

Write raw CSV bytes to disk

By filliptm·Created 3 years ago·Updated about 24 hours ago· 630
FL Save CSV
  • csv_data
    output_directory
    filenamecaptions.csv

    Buried in Fill-Nodes' captioning section - alongside caption savers, a word-frequency grapher, and an Ollama captioner - is a small cluster of nodes for building and moving CSVs around: FL_CaptionToCSV scans a directory and produces a CSV mapping filenames to captions, FL_LoadCSV reads one back in, and FL_SaveCSV is the plain terminal step that writes CSV bytes to a file. It's unglamorous, but it's the thing that turns an in-memory dataset mapping into a file you can actually hand to a training script.

    How it works

    It takes a CSV object - this pack's typed carrier for CSV data, the same type FL_CaptionToCSV and FL_LoadCSV produce - and writes its raw bytes to output_directory/filename. It creates the output directory if it doesn't exist, and if your filename doesn't already end in .csv, it appends the extension. That's the entire job.

    The inputs and outputs that matter

    • csv_data - the CSV object to write. This has to come from an upstream node that produces the typed object (FL_CaptionToCSV is the obvious source in this pack, since that's what builds a filename→caption CSV from a directory of images and caption .txt files).
    • output_directory - defaults to an empty string; set it explicitly rather than leaving it blank (see below).
    • filename - defaults to captions.csv, which tells you the node's primary intended use: closing out a captioning pipeline.

    There's no output socket at all - is_output_node is true and the node table shows zero outputs. This is a pure sink: something goes in, a file lands on disk, and that's the end of that branch of the graph.

    How to install it

    ComfyUI Manager: search "Fill-Nodes", install, restart. Manual:

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

    No special dependency for this node specifically - it's plain file writing - though the pack as a whole is large, so expect a bigger install than the node itself would suggest. Restart ComfyUI once it's cloned.

    Common issues & troubleshooting

    Blank output_directory writing somewhere unexpected. Same trap as the pack's other save nodes: an empty string resolves relative to wherever ComfyUI's process is running, not necessarily your project folder. Set an explicit path.

    "The node ran but nothing downstream uses the result." That's expected - it's a sink with no output. If you need to confirm the file landed, check the directory directly, or add a separate branch off csv_data into something like FL_ShowText (after converting to a readable form) before it hits FL_SaveCSV, since the save node itself won't hand you anything back to inspect.

    Overwriting on re-runs. There's no auto-increment or overwrite protection here - running the graph again with the same directory and filename replaces the previous file outright. If you're iterating on a captioning pipeline, vary the filename between test runs or you'll lose the previous output.

    Category🏵️Fill Nodes/Captioning

    Inputs (3)

    NameTypeDefaultDescription
    csv_dataCSV
    output_directorySTRING
    filenameSTRINGcaptions.csv

    Outputs (0)

    No outputs