Nodes/Quality of Life Nodes for ComfyUI/CSV Reader X Lora (Soze)
ComfyUI Node

CSV Reader X Lora (Soze)

Walk a CSV and a LoRA list off one counter

By SozeInc·Created 2 years ago·Updated 5 days ago· 10
CSV Reader X Lora (Soze)
    • Column_1
    • Column_2
    • Column_3
    • Column_4
    • Column_5
    • Column_6
    • Column_7
    • Column_8
    • Column_9
    • Column_10
    • Entire_Line
    • Row_Count
    • Lora_Full_Path
    • Lora_Name_Only
    • Lora_Index
    • status
    csv_filename_path
    index0
    start_lora_name
    lora_count1

    Say you want to test every LoRA in a set against every prompt in a spreadsheet - that's rows × LoRAs worth of combinations, and normally means nesting two loops. This node's whole reason for existing, straight from the pack's own docs, is collapsing that into one counter: "the X Checkpoint/X Lora variants iterate index across rows × models, so a single counter walks every (row, checkpoint) pair." Feed it one incrementing number, and it advances through both dimensions for you.

    How it works

    You give it a CSV file and a LoRA sequence to walk (start_lora_name plus lora_count LoRAs from that starting point), and one index value that ticks up each run. Internally, that single index maps onto a position in the combined row × LoRA space - as it climbs, it walks through every LoRA for the current row, then advances to the next row and starts the LoRA sequence again (that's what "walks every pair" means in practice). You drive index from something that actually increments across queue executions - an INT primitive on "increment," or a range node - not a fixed value, or you'll get the same row and LoRA every single run.

    The inputs and outputs that matter

    • csv_filename_path (required) - your CSV.
    • index (required, 0 to 1,000,000, tooltip: "The row number to read from the CSV file") - the counter driving both dimensions.
    • start_lora_name (required, tooltip: "The name of the starting LoRA") - a dropdown populated from your installed LoRAs, the first one in the sequence.
    • lora_count (required, 1–100, tooltip: "The number of LoRAs to iterate") - how many LoRAs from that start point to cycle through.

    Outputs cover both halves of the pair: Column_1Column_10 (up to ten columns from the current row), Entire_Line (the raw row text), Row_Count (total rows - your signal for when the CSV side has been fully walked), Lora_Full_Path, Lora_Name_Only, Lora_Index (which LoRA this particular index landed on), and status.

    How to install it

    ComfyUI Manager → search "ComfyUI_Soze" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SozeInc/ComfyUI_Soze.git
    pip install -r ComfyUI_Soze/requirements.txt
    

    then restart. No heavy dependency - plain CSV parsing. The schema doesn't specify the expected delimiter or quoting rules beyond "CSV," so test with a small, simple comma-separated file first before trusting anything with embedded commas or quotes.

    Common issues & troubleshooting

    Getting the same row and LoRA forever almost always means index is wired to a static value instead of something that increments per queue run - check that first.

    Row_Count is your safety rail: the schema doesn't document what happens when index runs past the end of the file, so build a stop condition around Row_Count rather than assuming the counter wraps cleanly on its own.

    Wire Lora_Full_Path (or Lora_Name_Only) into your LoRA loader and the relevant Column_N into your prompt text, and once the sweep's done, this pairs well with XY Image to lay the whole comparison out as one labeled grid instead of paging through results one at a time.

    Categoryutils

    Inputs (4)

    NameTypeDefaultDescription
    csv_filename_pathSTRING
    indexINT00–1000000The row number to read from the CSV file.
    start_lora_nameCOMBOThe name of the starting LoRA.
    lora_countINT11–100The number of LoRAs to iterate.

    Outputs (16)

    NameTypeDescription
    Column_1STRING
    Column_2STRING
    Column_3STRING
    Column_4STRING
    Column_5STRING
    Column_6STRING
    Column_7STRING
    Column_8STRING
    Column_9STRING
    Column_10STRING
    Entire_LineSTRING
    Row_CountINT
    Lora_Full_PathSTRING
    Lora_Name_OnlySTRING
    Lora_IndexINT
    statusSTRING