diff --git a/modules/sd_models.py b/modules/sd_models.py index dd749122c..d3775ec66 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -498,8 +498,6 @@ class SdModelData: pass 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) diff --git a/modules/sd_vae.py b/modules/sd_vae.py index dbade0679..ee1186568 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -192,7 +192,7 @@ def load_vae_dict(filename, map_location): 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 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) loaded_vae_file = vae_file + model.base_vae = base_vae + model.loaded_vae_file = loaded_vae_file # don't call this from outside