SwarmUI icon indicating copy to clipboard operation
SwarmUI copied to clipboard

Support Model Hashing for GGUF files

Open jtreminio opened this issue 2 months ago • 0 comments

Expected Behavior

The GetModelHash() method exits early at this line when attempting to generate the hash for a GGUF model.

This makes it so any downloaded GGUF model does not have a hash.

Expected behavior: load hash succeeds.

Actual Behavior

An empty string is returned. Overriding the line in C# will successfully generate the wrong hash (probably why you added that check) leading the GGUF to be assigned the hash of possibly a different model.

For example, the Chroma1-HD-dc-super-mix-Q4_0.gguf file will load the hash for some weird auto-asphyxiation model from CivitAI (not linking it).

Steps to Reproduce

Download any GGUF model, try to load its hash via UI. Observe nothing happening.

Debug Logs

TBD

Other

It seems adding a UI feature to manually set the hash would be beneficial. After overriding the line above I see the modelspec.hash and modelspec.hash_sha256 are identical, so either:

  1. Users can manually add the values themselves, possibly using a non-GGUF's hash, or
  2. Adding a UI element to manually type in the model hash to use for this GGUF file

jtreminio avatar Sep 29 '25 13:09 jtreminio