π File Hash
Is this actually the same file? SHA-256 says so
- Hash
Checksums, from inside the canvas
A hash is how you answer "is this the same file?" without opening it. File Hash reads a file and returns the hex digest - SHA-256 by default, MD5 if you switch the combo - using Python's hashlib, in 8 MB chunks so a 20 GB checkpoint doesn't get loaded into RAM.
Why you'd want that in a node graph is less obvious until you've had the problem. Model folders grow duplicates: the same LoRA downloaded twice under two names, a "fixed" file that's byte-identical to the one it replaced, an image dataset with three copies of the same picture. Hashing is the only honest way to dedupe. The other use is verification - you downloaded 12 GB from a host that publishes a checksum, and you'd like to know it arrived intact before you spend an hour debugging a model that "won't load".
The image side is where this pack lives, so the interesting version is: hash a folder of outputs to find re-encodes, or hash a PNG to confirm two files that look different in a viewer are actually the same bytes.
How it works
path in, digest out. If the path isn't a file, it raises File not found: β¦ rather than returning an empty string - good, because a silent empty hash would be indistinguishable from a bug. The whole file is read, so time scales with size: SHA-256 on a 6 GB checkpoint takes a few seconds of pure disk I/O, and hashing a folder of 500 images takes as long as reading all of them. There's no caching layer - re-run the node and it hashes again.
SHA-256 is the default and the one you should use. MD5 is faster and fine for "did my copy get corrupted" spot checks; it's broken for anything adversarial, which for local model files basically doesn't matter, but there's no reason not to use SHA-256 in 2026. Both are offered as the combo's only options, and the output is a lowercase hex string.
Inputs and output
Path is socket-only - the pack marks it force_input, so you can't type a path into this node. That surprises people constantly. The workflow is π Directory (or π Path Join) β File Hash, or π List Files β π Array For Each β File Hash for a batch.
Algorithm is the SHA-256 / MD5 combo. Changing it changes the digest, obviously; if you're comparing against a hash someone published, check which algorithm they used. Sites that show a short "model hash" are showing a truncated digest, and a truncated digest of the wrong algorithm will never match.
One output: Hash (STRING). Wire it into a text preview, a console print, or into a filename via a string concatenation node; there's no branch logic built on it in this pack, so a hash either gets logged or gets stored, and both are fine.
The dedupe pattern that's worth building
π List Files with *.safetensors β π Array For Each (index driven, one file per queued run) β π οΈ Print to Console for the path, then File Hash, then print the digest. Run it across a folder's worth of queued prompts, collect the console output, and you have a duplicate map in five minutes. It's not elegant, and it beats doing it by hand with a folder of 200 LoRAs.
Caveat worth stating: identical digest means identical bytes. Two LoRAs with the same trigger words but different training steps produce completely different hashes, and two files with different names but the same hash are the same file. That's the whole semantics; don't read more into it.
Install
Manager: Extensions β Node Pack β search "Honda Nodes" β Install β restart. Manual:
cd ComfyUI/custom_nodes
git clone --depth 1 https://github.com/Avaray/honda-nodes.git
cd honda-nodes
python install.py # ComfyUI's python; portable Windows: ..\..\..\python_embeded\python.exe install.py
hashlib is stdlib, so this node needs nothing downloaded - the installer's jq/ime are for the JSON and metadata nodes. Pack-wide requirement: ComfyUI 0.38.0+, since it's authored entirely against the V3 schema.
Common issues
"File not found", path looks right. Leading or trailing whitespace, or a Windows path with single backslashes that got mangled somewhere upstream. Wire the path through π οΈ Print to Console and compare the printed string with the real one. Also check the case on Linux - Run1.PNG and run1.png are different files there.
It hangs on a big folder. It's reading every byte. That's the job. Hash fewer files per run, or accept the wait.
Hash differs from the one on the download page. Different algorithm, a truncated digest being compared, or a genuinely different file (a re-quantised GGUF, a re-saved safetensors with different metadata). Note the last one especially: re-saving a model file changes its hash while keeping the weights, which is why "same model, different hash" is a real and common thing.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | Absolute path to the file. | |
| algorithm | COMBO | SHA-256 | 2 options: SHA-256, MD5 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Hash | STRING | β |