mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-06 15:15:05 +08:00
Change where VAE state are stored in model
This commit is contained in:
parent
af5d2e8e5f
commit
549b0fc526
@ -498,8 +498,6 @@ class SdModelData:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if v is not None:
|
if v is not None:
|
||||||
v.base_vae = sd_vae.base_vae
|
|
||||||
v.loaded_vae_file = sd_vae.loaded_vae_file
|
|
||||||
self.loaded_sd_models.insert(0, v)
|
self.loaded_sd_models.insert(0, v)
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ def load_vae_dict(filename, map_location):
|
|||||||
|
|
||||||
|
|
||||||
def load_vae(model, vae_file=None, vae_source="from unknown source"):
|
def load_vae(model, vae_file=None, vae_source="from unknown source"):
|
||||||
global vae_dict, loaded_vae_file
|
global vae_dict, base_vae, loaded_vae_file
|
||||||
# save_settings = False
|
# save_settings = False
|
||||||
|
|
||||||
cache_enabled = shared.opts.sd_vae_checkpoint_cache > 0
|
cache_enabled = shared.opts.sd_vae_checkpoint_cache > 0
|
||||||
@ -230,6 +230,8 @@ def load_vae(model, vae_file=None, vae_source="from unknown source"):
|
|||||||
restore_base_vae(model)
|
restore_base_vae(model)
|
||||||
|
|
||||||
loaded_vae_file = vae_file
|
loaded_vae_file = vae_file
|
||||||
|
model.base_vae = base_vae
|
||||||
|
model.loaded_vae_file = loaded_vae_file
|
||||||
|
|
||||||
|
|
||||||
# don't call this from outside
|
# don't call this from outside
|
||||||
|
Loading…
Reference in New Issue
Block a user