mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
Checkpoint cache by combination key of checkpoint and vae
This commit is contained in:
@@ -43,7 +43,7 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path):
|
||||
vae_dict.update(res)
|
||||
return vae_list
|
||||
|
||||
def load_vae(model, checkpoint_file, vae_file="auto"):
|
||||
def resolve_vae(checkpoint_file, vae_file="auto"):
|
||||
global first_load, vae_dict, vae_list
|
||||
# save_settings = False
|
||||
|
||||
@@ -94,6 +94,12 @@ def load_vae(model, checkpoint_file, vae_file="auto"):
|
||||
if vae_file and not os.path.exists(vae_file):
|
||||
vae_file = None
|
||||
|
||||
return vae_file
|
||||
|
||||
def load_vae(model, vae_file):
|
||||
global first_load, vae_dict, vae_list
|
||||
# save_settings = False
|
||||
|
||||
if vae_file:
|
||||
print(f"Loading VAE weights from: {vae_file}")
|
||||
vae_ckpt = torch.load(vae_file, map_location=shared.weight_load_location)
|
||||
|
Reference in New Issue
Block a user