LZ Append Log to CSV
Track every generation in a spreadsheet, automatically
- lz_pipe
- output_path
Somewhere in every serious ComfyUI user's past is the spreadsheet where they hand-typed seed, steps, and CFG for every image they wanted to reproduce. LZ Append Log to CSV is the cure: connect it at the end of your chain and every run appends a row to a CSV file with timestamp, seed, steps, CFG, sampler, scheduler, dimensions, checkpoint, and both prompts. You open the file in Excel, LibreOffice, or Google Sheets and you have a searchable generation history with zero typing.
How it works
It's an output node with two required controls: filepath (where the CSV lives; defaults to generation_log.csv, resolved relative to wherever ComfyUI's working directory is) and mode - write creates a fresh file with a header row, append reads the existing file and adds a row (creating it with a header if it doesn't exist yet).
The clever part is its two input paths. Every parameter is available as an optional direct socket (seed, steps, cfg, sampler_name, scheduler, positive_prompt, negative_prompt, width, height, checkpoint_name, image_count), but if you connect an lz_pipe, the pipe's own recorded values win - the pipe already carries seed/steps/cfg/sampler from your LZKSamplerDecode, the prompt text from your loader, and the checkpoint name/hash. So the typical setup is one wire: sampler's pipe out → this node, done.
Each row gets a %Y-%m-%d %H:%M:%S timestamp, and the node returns the absolute path to the file on its single output (output_path), so you can display or route where the log landed.
What it's actually for
Three workflows, roughly: reproducibility (search the CSV for a seed and settings, re-run it), parameter archaeology (see which CFG/sampler combo you were using when output quality changed), and accountability (a running record of exactly what you generated, with checkpoint hash if your pipe carried it). It pairs naturally with LZSaveImageAndLog - that writes per-image .txt logs and PNG metadata, this gives you the aggregated table view. Different tools for different queries.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/liz-ils/ComfyUI-LZNodes
restart → MyCustomNodes/Log. ComfyUI Manager: search ComfyUI-LZNodes. No extra dependencies - it uses only Python's stdlib csv module.
Where people get burned
- The prompts can be huge and messy in a spreadsheet - the CSV stores full multiline prompt text with embedded newlines, which some spreadsheet apps mangle. It's CSV, not an API; expect to handle quoting if your prompts are long.
mode: appendnever writes a header if the file already exists, so if you create it once in write mode and later move/rename files, a fresh append won't re-add headers - that's actually the design, it preserves your existing data.- Defaults lie quietly. If you don't connect a pipe or the direct sockets, it logs the node's own defaults (seed 0, steps 20, cfg 8, euler, 512×512) as if they were real. Wire the pipe; don't trust a default-filled row.
It's not glamorous, but if you've ever lost a good seed to a forgotten screenshot, it's the node that stops that from ever happening again.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| filepath | STRING | generation_log.csv | — |
| mode | COMBO | 2 options: write, append | |
| lz_pipeopt | LZ_PIPE | — | |
| seedopt | INT | 0 | — |
| stepsopt | INT | 20 | — |
| cfgopt | FLOAT | 8.00 | — |
| sampler_nameopt | STRING | euler | — |
| scheduleropt | STRING | normal | — |
| positive_promptopt | STRING | — | |
| negative_promptopt | STRING | — | |
| widthopt | INT | 512 | — |
| heightopt | INT | 512 | — |
| checkpoint_nameopt | STRING | — | |
| image_countopt | INT | 1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |