Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
3780ad3a
Commit
3780ad3a
authored
Nov 04, 2022
by
digburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: loading models without vae from cache
parent
cd5eafaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
sd_models.py
modules/sd_models.py
+3
-2
No files found.
modules/sd_models.py
View file @
3780ad3a
...
@@ -204,8 +204,9 @@ def load_model_weights(model, checkpoint_info, vae_file="auto"):
...
@@ -204,8 +204,9 @@ def load_model_weights(model, checkpoint_info, vae_file="auto"):
checkpoints_loaded
.
popitem
(
last
=
False
)
# LRU
checkpoints_loaded
.
popitem
(
last
=
False
)
# LRU
else
:
else
:
vae_name
=
sd_vae
.
get_filename
(
vae_file
)
vae_name
=
sd_vae
.
get_filename
(
vae_file
)
if
vae_file
else
None
print
(
f
"Loading weights [{sd_model_hash}] with {vae_name} VAE from cache"
)
vae_message
=
f
" with {vae_name} VAE"
if
vae_name
else
""
print
(
f
"Loading weights [{sd_model_hash}]{vae_message} from cache"
)
checkpoints_loaded
.
move_to_end
(
checkpoint_key
)
checkpoints_loaded
.
move_to_end
(
checkpoint_key
)
model
.
load_state_dict
(
checkpoints_loaded
[
checkpoint_key
])
model
.
load_state_dict
(
checkpoints_loaded
[
checkpoint_key
])
...
...
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