Nodes/ComfyUI-LZNodes/LZ Save Image & Log
ComfyUI Node

LZ Save Image & Log

The save node that writes your whole recipe to a .txt

By liz-ils·Created 7 months ago·Updated 12 days ago· 1
LZ Save Image & Log
  • images
  • lz_pipe
    filename_prefixLZ_Output
    image_formatpng
    save_txt_logtrue
    preview_onlyfalse
    add_timestamptrue
    positive_text
    negative_text
    width
    height
    seed
    steps
    cfg
    sampler_name
    scheduler
    ckpt_name
    ckpt_hash
    lora_model
    lora_weight

    ComfyUI's stock SaveImage already embeds the workflow in the PNG, so you can drag the image back in and recover everything. LZ Save Image & Log does that, and then goes one step further for people who keep records outside ComfyUI: it writes a human-readable .txt log next to the image with the entire generation recipe - date, checkpoint and its hash, LoRAs and strengths, size, seed, steps, CFG, sampler, scheduler, and the full positive and negative prompts.

    If you've ever spent an hour trying to remember which seed produced the image you're staring at, you know why this exists. It saves PNG, WEBP, or JPG (image_format), embeds the log string into PNG metadata invisibly, and can also write that same text to a .txt file sitting alongside the image.

    The inputs that matter

    • images - the image batch to save.
    • filename_prefix - default LZ_Output; a counter and timestamp get appended.
    • image_format - png, webp, or jpg. PNG gets full metadata; WEBP and JPG don't carry the workflow chunks the way PNG does, so if provenance matters, stay on PNG.
    • save_txt_log - writes the .txt sidecar. Default on.
    • preview_only - saves to ComfyUI's temp folder and skips the log. Handy when you want to look before you commit to the output folder.
    • add_timestamp - a Date: line at the top of the log.

    Then a stack of optional inputs (lz_pipe, positive_text, negative_text, width, height, seed, steps, cfg, sampler_name, scheduler, ckpt_name, ckpt_hash) that fill the log.

    The gotcha that catches everyone

    Here's the trap: the log's values come from the pipe and the optional inputs, not from the actual image. If you feed this node only an IMAGE and nothing else, you get a log that reads Size: Unknown x Unknown and Seed: Unknown | Steps: Unknown... - technically correct, practically useless. The values are populated when you also wire in an lz_pipe that carries them (the pack's own sampler fills seed/steps/cfg/sampler/scheduler/width/height into the pipe as it runs) or when you connect the individual inputs. So the intended flow is: full pipe in, image in, rich log out. Feed it bare pixels and it'll happily save, but the sidecar will be mostly "Unknown."

    Also worth knowing: the metadata it embeds is the flat A1111-style parameters string (the same dialect the KB's metadata doc describes - a plain-text recipe chunk) plus the standard ComfyUI workflow and prompt JSON chunks. So you get the drag-back-into-ComfyUI behavior and the human-readable text in one file. Convert to JPEG or push through a recompressing host and all of it is gone - keep the original PNG.

    Installing it

    Part of the ComfyUI-LZNodes pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/liz-ils/ComfyUI-LZNodes
    

    Restart ComfyUI (or Manager → search "ComfyUI-LZNodes"). No extra dependencies, no model downloads.

    If you're the spreadsheet type, the same pack's LZSaveStringToCSV writes a CSV row instead of prose - and LZLogReader can read these .txt logs back into node outputs if you ever need to restore parameters from an old batch.

    CategoryMyCustomNodes/IO

    Inputs (20)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGLZ_Output
    image_formatCOMBOpng3 options: png, webp, jpg
    save_txt_logBOOLEANtrue
    preview_onlyBOOLEANfalse
    add_timestampBOOLEANtrue
    lz_pipeoptLZ_PIPE
    positive_textoptSTRING
    negative_textoptSTRING
    widthoptINT
    heightoptINT
    seedoptINT
    stepsoptINT
    cfgoptFLOAT
    sampler_nameoptSTRING
    scheduleroptSTRING
    ckpt_nameoptSTRING
    ckpt_hashoptSTRING
    lora_modeloptSTRING
    lora_weightoptSTRING

    Outputs (0)

    No outputs