Nodes/ComfyUI-TechsToolz/🖥️🛠TechsToolz: Save Image w/Metadata
ComfyUI Node

🖥️🛠TechsToolz: Save Image w/Metadata

Stamp your whole generation recipe onto the file, not just a workflow JSON

By robin-collins·Created about a year ago·Updated about a year ago· 0
🖥️🛠TechsToolz: Save Image w/Metadata
  • images
    â—„filename%time_%seedâ–ş
    â—„pathâ–ş
    â—„extensionâ–ľâ–ş
    â—„steps20â–ş
    â—„cfg8.00â–ş
    â—„modelnameâ–ş
    â—„sampler_nameâ–ľâ–ş
    â—„schedulerâ–ľâ–ş
    â—„positiveunknownâ–ş
    â—„negativeunknownâ–ş
    â—„seed_value0â–ş
    â—„width512â–ş
    â—„height512â–ş
    â—„lossless_webptrueâ–ş
    â—„quality_jpeg_or_webp100â–ş
    â—„counter0â–ş
    â—„time_format%Y-%m-%d-%H%M%Sâ–ş

    ComfyUI's built-in Save Image already embeds the full workflow JSON in the PNG - drag the file back in and the graph reconstructs. So why would you reach for a third-party saver? Because that JSON is for the machine. This node stamps the human-readable recipe on the file too: the prompt, negative prompt, steps, sampler, scheduler, CFG, seed, model name and model hash, all written out in the same parameters format AUTOMATIC1111 used. That's the version you can read at a glance in any PNG metadata viewer, paste into a Civitai description, or spot-check when someone asks "wait, which sampler did you actually use?"

    It ships in ComfyUI-TechsToolz, a small personal pack by Robin Collins - pyproject calls it "a collection of what I wanted!" - that at 0.0.2 has exactly two nodes. Don't expect a big community around it; expect a focused utility that does one thing properly.

    How it works

    For PNG files it does two writes in one save. It builds a single parameters text block - prompt, negative, steps, sampler, CFG, seed, size, model hash, model - and tucks it into the PNG's tEXt chunk alongside the prompt and workflow JSON that ComfyUI supplies automatically. So you get the drag-back-into-ComfyUI workflow and the readable recipe. For JPEG and WebP it takes a different route: the comment goes into the EXIF UserComment field via piexif, since those formats have no PNG-style text chunks.

    That distinction matters more than it looks. The workflow JSON only goes into PNGs. Save a JPEG and you get the recipe but not the reconstructable graph, so don't rely on drag-back for your webp output.

    The inputs that matter

    You set most of these once and forget them:

    • images - your IMAGE tensor, the only true wiring.
    • filename - a pattern, default %time_%seed. Placeholders are %time, %seed, %model, %counter, %date.
    • path - relative subfolder under ComfyUI's output/. Empty = root of output/. It creates the directory if missing.
    • extension - png, jpeg, or webp.
    • modelname - type the exact checkpoint filename. This one is mandatory, see below.
    • The metadata group: steps, cfg, sampler_name, scheduler, seed_value, width, height, positive, negative. These are the values stamped on the file, so keep them in sync with what you actually ran.

    This is an output node - no outputs to wire, it just saves and shows the files in the UI.

    Installing

    Via ComfyUI Manager, search "ComfyUI-TechsToolz" and install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/robin-collins/ComfyUI-TechsToolz.git
    cd ComfyUI-TechsToolz
    python install.py
    

    Then restart ComfyUI. Dependencies are light - piexif, numpy, Pillow - nothing model-sized to download.

    Where people get burned

    The modelname field will crash the node if you leave it empty. It's not optional in practice: the code resolves the checkpoint path from it, then hashes the file to build Model hash:. Empty string means no path, and the hash call dies. Type the exact filename - juggernautXL_v9.safetensors, not the folder path - and you're fine. (Wiring the Model Name Extractor from the same pack into this field is the clean fix.)

    Also: counter isn't automatic. It's a manual number you bump yourself, only used if %counter is in your filename. And every startup, the pack's dependency scanner prints a big report to the console - harmless, just noisy. If the output looks blank, check you didn't point path somewhere odd and that ComfyUI was restarted after install.

    Category🖥️🛠TechsToolz

    Inputs (18)

    NameTypeDefaultDescription
    imagesIMAGE—
    filenameSTRING%time_%seed—
    pathSTRING—
    extensionCOMBO3 options: png, jpeg, webp
    stepsINT201–10000—
    cfgFLOAT8.000–100—
    modelnameSTRING—
    sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
    positiveoptSTRINGunknown—
    negativeoptSTRINGunknown—
    seed_valueoptINT00–18446744073709550000—
    widthoptINT5121–16384—
    heightoptINT5121–16384—
    lossless_webpoptBOOLEANtrue—
    quality_jpeg_or_webpoptINT1001–100—
    counteroptINT00–18446744073709550000—
    time_formatoptSTRING%Y-%m-%d-%H%M%S—

    Outputs (0)

    No outputs