Skip to content

Initial model download integrity#15602

Merged
AUTOMATIC1111 merged 2 commits intodevfrom
initial-model-download-integrity
Jun 8, 2024
Merged

Initial model download integrity#15602
AUTOMATIC1111 merged 2 commits intodevfrom
initial-model-download-integrity

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:

w-e-w added 2 commits April 23, 2024 03:09
if the sha256 hash does not match it will be automatically deleted
@w-e-w w-e-w requested a review from AUTOMATIC1111 as a code owner April 22, 2024 18:23
@AUTOMATIC1111 AUTOMATIC1111 merged commit 30461be into dev Jun 8, 2024
@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