-
Notifications
You must be signed in to change notification settings - Fork 27.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Model hash no longer returned in model information from API #12150
Comments
if the model hasn't been loaded before or if the |
Can't reproduce. Likely related to what w-e-w mentioned above. Feel free to re-open if you still think it's an issue. |
@w-e-w @catboxanon Sorry for late response. cache.json was still there and still had hashes in it. I updated again to latest as of today (5ef669d) , then deleted venv, and deleted cache,json and let it reinitialize the entire environment. It also generated a new cache.json. For some reason, I am still just not seeing a hash on several models through the API. Is this something I need to manually add to cache.json? I've always been able to get hashes through the API for all models up until recently. |
Well, as of now, you need to load the model at least once in the webui for the hash to be generated. If hashing it not disabled, and it's not generating the hash and writing it back to the cache file, then something is going wrong. |
I see, I did not know that. I use it entirely headless with --api and never actually load the webui in a browser at all, so that is likely causing my issue. Is there some way to avoid that? Starting the webui in a browser and clicking through loading all models 1 by 1 just to ensure they have caches available in the API seems a bit much, but perhaps I can figure out how to do this automatically. |
I've made a script to do so here: https://gist.github.com/catboxanon/4f56fdd1dd0ab207c6231eef3006c012 |
Thanks, cat! Awesome |
@catboxanon I made a PR to do it too #12909 |
Is there an existing issue for this?
What happened?
Model hash no longer returned in model information from API. It returns "null" for all most hashes now, but before it returned a hash for every model. This is for the sdapi/v1/sd-models api.
Steps to reproduce the problem
Use the API to request model information and notice that no hashes are returned.
What should have happened?
Hashes should be returned.
Version or Commit where the problem happens
68f336b
What Python version are you running on ?
Python 3.10.x
What platforms do you use to access the UI ?
Windows
What device are you running WebUI on?
Nvidia GPUs (RTX 20 above)
Cross attention optimization
xformers
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
List of extensions
None
Console logs
Additional information
I have discord bots running SD using A1111 as the backend, and they interact with it through the API. It has been many months since I have updated A1111 or the bots, so it is unknown when the hashes actually stopped being returned, but I updated A1111 yesterday to take advantage of the SDXL support and hashes are now returned as null.
The text was updated successfully, but these errors were encountered: