Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
c69773d7
Commit
c69773d7
authored
Apr 23, 2024
by
w-e-w
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure integrity for initial sd model download
parent
246c269a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
modules/sd_models.py
modules/sd_models.py
+3
-1
No files found.
modules/sd_models.py
View file @
c69773d7
...
@@ -149,10 +149,12 @@ def list_models():
...
@@ -149,10 +149,12 @@ def list_models():
cmd_ckpt
=
shared
.
cmd_opts
.
ckpt
cmd_ckpt
=
shared
.
cmd_opts
.
ckpt
if
shared
.
cmd_opts
.
no_download_sd_model
or
cmd_ckpt
!=
shared
.
sd_model_file
or
os
.
path
.
exists
(
cmd_ckpt
):
if
shared
.
cmd_opts
.
no_download_sd_model
or
cmd_ckpt
!=
shared
.
sd_model_file
or
os
.
path
.
exists
(
cmd_ckpt
):
model_url
=
None
model_url
=
None
expected_sha256
=
None
else
:
else
:
model_url
=
f
"{shared.hf_endpoint}/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors"
model_url
=
f
"{shared.hf_endpoint}/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors"
expected_sha256
=
'6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa'
model_list
=
modelloader
.
load_models
(
model_path
=
model_path
,
model_url
=
model_url
,
command_path
=
shared
.
cmd_opts
.
ckpt_dir
,
ext_filter
=
[
".ckpt"
,
".safetensors"
],
download_name
=
"v1-5-pruned-emaonly.safetensors"
,
ext_blacklist
=
[
".vae.ckpt"
,
".vae.safetensors"
])
model_list
=
modelloader
.
load_models
(
model_path
=
model_path
,
model_url
=
model_url
,
command_path
=
shared
.
cmd_opts
.
ckpt_dir
,
ext_filter
=
[
".ckpt"
,
".safetensors"
],
download_name
=
"v1-5-pruned-emaonly.safetensors"
,
ext_blacklist
=
[
".vae.ckpt"
,
".vae.safetensors"
]
,
hash_prefix
=
expected_sha256
)
if
os
.
path
.
exists
(
cmd_ckpt
):
if
os
.
path
.
exists
(
cmd_ckpt
):
checkpoint_info
=
CheckpointInfo
(
cmd_ckpt
)
checkpoint_info
=
CheckpointInfo
(
cmd_ckpt
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment