AlexopusandClaude b7c7b07c9f Fix caching bug in CivitaiHashFetcher
Changed `self.cached_hash` to `self.last_hash` on line 129 to match
the variable name used in __init__ (line 13) and the cache check (line 39).

Previously, the cache would save to the wrong variable name, causing
subsequent calls with the same parameters to return None instead of
the cached hash value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 14:57:34 +02:00
2025-06-09 14:16:32 +02:00
2025-07-23 11:34:20 +02:00
2025-03-24 17:59:42 +01:00
2025-08-17 18:50:42 +02:00
2025-07-05 00:01:16 +02:00
2025-06-09 14:16:32 +02:00
2023-08-17 14:27:32 +04:00
2025-08-24 17:39:28 +02:00
2025-02-28 13:24:32 +01:00
2025-07-26 10:55:47 +02:00
2025-08-17 18:50:42 +02:00
2025-06-09 14:20:19 +02:00
2023-08-17 00:12:31 +04:00
2025-06-09 14:16:32 +02:00

[!] Forked from https://github.com/giriss/comfy-image-saver, which seems to be inactive since a while.

Save image with generation metadata in ComfyUI

Allows you to save images with their generation metadata. Includes the metadata compatible with Civitai geninfo auto-detection. Works with PNG, JPG and WEBP. For PNG stores both the full workflow in comfy format, plus a1111-style parameters. For JPEG/WEBP only the a1111-style parameters are stored. Includes hashes of Models, LoRAs and embeddings for proper resource linking on civitai.

You can find the example workflow file named example-workflow.json. workflow

You can also add LoRAs to the prompt in <lora:name:weight> format, which would be translated into hashes and stored together with the metadata. For this it is recommended to use ImpactWildcardEncode from the fantastic ComfyUI-Impact-Pack. It will allow you to convert the LoRAs directly to proper conditioning without having to worry about avoiding/concatenating lora strings, which have no effect in standard conditioning nodes. Here is an example: workflow

This would have civitai autodetect all of the resources (assuming the model/lora/embedding hashes match): image

How to install?

If you have ComfyUI-Manager, you can simply search "ComfyUI Image Saver" and install these custom nodes.

Method 2: Easy

If you don't have ComfyUI-Manager, then:

  • Using CLI, go to the ComfyUI folder
  • cd custom_nodes
  • git clone git@github.com:alexopus/ComfyUI-Image-Saver.git
  • cd ComfyUI-Image-Saver
  • pip install -r requirements.txt
  • Start/restart ComfyUI

Customization of file/folder names

You can use following placeholders:

  • %date
  • %time – format taken from time_format
  • %model – full name of model file
  • %basemodelname – name of model (without file extension)
  • %seed
  • %counter
  • %sampler_name
  • %scheduler
  • %steps
  • %cfg
  • %denoise

Example:

filename value Result file name
%time-%basemodelname-%cfg-%steps-%sampler_name-%scheduler-%seed 2023-11-16-131331-Anything-v4.5-pruned-mergedVae-7.0-25-dpm_2-normal-1_01.png
S
Description
No description provided
Readme MIT
839 KiB
Languages
Python 97.5%
JavaScript 2.5%