Initial model download integrity #15602
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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 matchin 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: