Civitai Hash Fetcher (Image Saver)
Pull a model's hash live so shared workflows self-link
- STRING
This one solves a genuinely annoying chicken-and-egg problem. When you share a workflow file on Civitai, the site links resources by hash - but the hash of a zipped workflow only exists after you upload it, so you can't bake it into the workflow beforehand. Civitai Hash Fetcher gets around that by asking Civitai's API for the model's current hash at runtime, by name, instead of relying on a value you baked in. That means a shared workflow can fetch its own hash after being uploaded, and every image it generates cross-posts to the workflow page automatically.
It's niche, but if you publish workflows on Civitai and want generations to link back to them, it's the piece that makes it work. It came out of exactly that community need.
How it works
You give it a Civitai username and a model (resource) name, optionally a version. When the graph runs, it hits the Civitai API, looks up that resource, and returns its hash as a string. You then feed that string into a saver's additional_hashes so it lands in the image metadata. Because the lookup happens live on every run, the hash is always the current one on the site - no manual copy-paste, no stale value.
Yes, despite living in a pack whose main selling point is "no API key needed," this specific node does reach out to Civitai's public API. It's a network call, so it needs Civitai to be reachable and the resource to actually exist under that name.
The inputs and outputs that matter
- username (required) - the Civitai account that owns the resource.
- model_name (required) - the resource name to look up. This has to match what's on Civitai closely enough to resolve.
- version (optional) - pin a specific version; leave blank for the latest.
The single output is a STRING - the fetched hash. Route it into the additional_hashes field of Image Saver, Image Saver Metadata, or Image Saver Simple's metadata source.
Installing it
ComfyUI Manager: search ComfyUI Image Saver, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/alexopus/ComfyUI-Image-Saver
cd ComfyUI-Image-Saver
pip install -r requirements.txt
Restart and hard-refresh. The requirements.txt install is what gives the pack its HTTP client for these API calls.
Where people get tripped up
Two things. First, it's a live network call - if Civitai is down, rate-limiting, or the username/model name doesn't resolve to a real resource, you get nothing useful back. Double-check the exact name and username against the Civitai page.
Second, fetching the hash doesn't do anything by itself. The output is just a string; you have to actually route it into a saver's additional_hashes for it to end up in the image metadata. Wire it to nothing and it's a no-op. This is a specialist tool for the workflow-sharing case - if you just want your normal model and LoRAs to link, the regular saver already hashes those; you don't need this node for everyday saving.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| username | STRING | — | |
| model_name | STRING | — | |
| versionopt | STRING | Specify version keyword to fetch a particular model version (optional) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |