stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

How get the Hash shows again in the model list GUI?

Open ZeroCool22 opened this issue 2 years ago • 12 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

With the last update, there is no more the Hash to the right of the model's name in the List Dropdown in the GUI.

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

Would like to see the Hashes.

Maybe there is a command argument to get it back?

Commit where the problem happens

ce9827a7c51a9f69bf62c634e35d34fa75ee1833

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

--xformers --vae-path "C:\Users\ZeroCool22\Desktop\Auto\models\Stable-diffusion\vae-ft-mse-840000-ema-pruned.ckpt"

Additional information, context and logs

No response

ZeroCool22 avatar Jan 15 '23 02:01 ZeroCool22

Agreed. I hate that I can't see the hash in the dropdown list.

RocketMobster avatar Jan 15 '23 17:01 RocketMobster

Agreed. I hate that I can't see the hash in the dropdown list.

Yeah, it's quite annoying.

ZeroCool22 avatar Jan 15 '23 23:01 ZeroCool22

It breaks other things that need the hash, like merge board.. being able to see the hash was very useful and we need it back to understand legacy mixes

RandomInternetPreson avatar Jan 16 '23 04:01 RandomInternetPreson

Add it to the list of currently broken things.

HRFix (supposedly, i still did no comparisons between old and new one, memory consumption, time, and quality) Generation progress in window title Hashes are missing

mezotaken avatar Jan 16 '23 05:01 mezotaken

Can confirm I'm affected as well; I discovered this when the hashes were no longer present in the API.

git checkout a407c9f0147c779865c940cbf62c7019dbc1f7b4 (i.e. the commit just before the changes to hashing) works for now.

philpax avatar Jan 16 '23 08:01 philpax

Guess I'll go against the crowd and say I very much prefer the hashes not being displayed in the model drop-down list 👀. I like it placed in the current unintrusive spot.

Kilvoctu avatar Jan 16 '23 08:01 Kilvoctu

Can confirm I'm affected as well; I discovered this when the hashes were no longer present in the API.

The hashes are present in API, though it's different from before to get them.

Kilvoctu avatar Jan 16 '23 08:01 Kilvoctu

Can confirm I'm affected as well; I discovered this when the hashes were no longer present in the API.

The hashes are present in API, though it's different from before to get them.

For the issue we're describing, they're null:

{
  // ...
  {
    "title": "Stable v2.1 ^2.ckpt",
    "model_name": "Stable v2.1 ^2",
    "hash": null,
    "sha256": null,
    "filename": "F:\\stable-diffusion-webui\\models\\Stable-diffusion\\Stable v2.1 ^2.ckpt",
    "config": "F:\\stable-diffusion-webui\\models\\Stable-diffusion\\Stable v2.1 ^2.yaml"
  },
  // ...
}

EDIT: Oh. I see. The hash cache is populated when a model is loaded, so the hash is empty for all remaining models. Additionally, the hash is not present in the title, which I was relying on - but if hash is always present, that's fine, I can work around that.

philpax avatar Jan 16 '23 08:01 philpax

The model has to be loaded once, then the information will be in the API.
I went into it a bit on my bot PR yesterday https://github.com/Kilvoctu/aiyabot/pull/88

edit: yes, it's a little inconvenient but workable 😅

Kilvoctu avatar Jan 16 '23 08:01 Kilvoctu

Fair enough - still think the hashes for all existing models should be calculated on startup, though. Having the hashes only available when that model has been loaded once is pretty unintuitive for API users.

philpax avatar Jan 16 '23 08:01 philpax

Fair enough - still think the hashes for all existing models should be calculated on startup, though. Having the hashes only available when that model has been loaded once is pretty unintuitive for API users.

Yea I agree that would streamline things. I have about 60 models, and it took quite some time to grab the hashes again.

Kilvoctu avatar Jan 16 '23 08:01 Kilvoctu

Can confirm I'm affected as well; I discovered this when the hashes were no longer present in the API.

The hashes are present in API, though it's different from before to get them.

Hey where do you view the model hashes now?

Erixnder avatar Jan 16 '23 14:01 Erixnder

The hashes are present in API, though it's different from before to get them.

Hey where do you view the model hashes now?

In API, all the information is in /sdapi/v1/sd-models. You can pull hash or sha256 for each model. Also on the Web UI itself, the hash is displayed at the bottom of the UI.

Kilvoctu avatar Jan 16 '23 18:01 Kilvoctu

Can't you make it possible to turn on and off the current hash code with an option in Settings? For me it would be a big help if it could be seen in the list like before. But if it would bother someone, they could turn off the display.

mykeehu avatar Jan 18 '23 17:01 mykeehu

This please ^

HardeNNN avatar Jan 18 '23 19:01 HardeNNN

Check out the latest version, the hash codes are back. For me it only appears when you select the model, so it doesn't generate the code in advance.

mykeehu avatar Jan 19 '23 18:01 mykeehu

For those of us with months of image files with the old hashes, here is kind of a hacky and messy work-around to get the old hashes back in the drop-down.

  1. Calculate the old hashes using this brilliant script https://github.com/etherealxx/oneclick-showmodelhash (I put the file in the ..\stable-diffusion-webui\models\Stable-diffusion folder and then ran it from the command line in Anaconda Prompt.)
  2. Use the output from the script to append the old hashes to the model file names so they are displayed in the UI dropdown again (requires restarting the UI, obviously).
  3. As mentioned above, once the model files are all renamed, open them all in the WebUI again to get the new hashes in the dropdown (Also a pain, but a one time job, hopefully).

A person could rename all their old image files to append the new hashes as well. I'm considering doing this, too, for ease of reference.

morecatplease avatar Jan 19 '23 18:01 morecatplease

Open a separate feature request for full rehash of every file on startup, or old hashes. Old hashes are still used by "send to" feature when the appropriate setting is disabled. It's even possible to get them back into the model list if someone's willing to make a PR. image

mezotaken avatar Jan 21 '23 23:01 mezotaken

The hashes are present in API, though it's different from before to get them.

Hey where do you view the model hashes now?

In API, all the information is in /sdapi/v1/sd-models. You can pull hash or sha256 for each model. Also on the Web UI itself, the hash is displayed at the bottom of the UI.

/sdapi/v1/sd-models. i canot find trhis anymore.....

LIQUIDMIND111 avatar Jan 25 '23 12:01 LIQUIDMIND111