Skip to content
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

Initial model download integrity #15602

Merged
merged 2 commits into from
Jun 8, 2024
Merged

Conversation

w-e-w
Copy link
Collaborator

@w-e-w w-e-w commented Apr 22, 2024

Description

Initial model download integrity

recently they seems to be several instances of for whatever reason the "default auto downlaod model" when no model is found being corrupted on download

the file we download by default is v1-5-pruned-emaonly.safetensors
page url https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.safetensors
sha256: 6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa

issue post of corrupted models

Loading weights [ff3a2961a8] from M:\z\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Loading weights [7f008929e1] from F:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors

As corrupted model could have serious consequences causing webui to enter a "unable to switch model loop" it makes sense to check for the Integrity of the file


the download_url_to_file utility we used to download the model will automatically delete the model if the hash does not match

  • along with if the hash dose not match and is deleted webui would still be able to launch, just not able to generate images

in these cases users can either retry downloading the model by restarting web UI
download the models manually
or possibly install model downloader extensions to help them download other models

clarification
there is no risk of user files be accidentally deleted
the Integrity check it's only performed on the model that is currently being downloaded

Checklist:

if the sha256 hash does not match it will be automatically deleted
@AUTOMATIC1111 AUTOMATIC1111 merged commit 30461be into dev Jun 8, 2024
6 checks passed
@AUTOMATIC1111 AUTOMATIC1111 deleted the initial-model-download-integrity branch June 8, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants