mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
fix: loading models without vae from cache
This commit is contained in:
parent
cd5eafaf03
commit
3780ad3ad8
@ -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])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user