Fix for consistency with shared.opts.sd_vae of UI

This commit is contained in:
Uminosachi 2023-08-21 11:28:53 +09:00
parent 549b0fc526
commit be301f224d
1 changed files with 1 additions and 0 deletions

View File

@ -671,6 +671,7 @@ def reuse_model_from_already_loaded(sd_model, checkpoint_info, timer):
shared.opts.data["sd_checkpoint_hash"] = already_loaded.sd_checkpoint_info.sha256
print(f"Using already loaded model {already_loaded.sd_checkpoint_info.title}: done in {timer.summary()}")
sd_vae.reload_vae_weights(already_loaded)
return model_data.sd_model
elif shared.opts.sd_checkpoints_limit > 1 and len(model_data.loaded_sd_models) < shared.opts.sd_checkpoints_limit:
print(f"Loading model {checkpoint_info.title} ({len(model_data.loaded_sd_models) + 1} out of {shared.opts.sd_checkpoints_limit})")