call model_loaded_callback after setting shared.sd_model in case scripts refer to it using that

This commit is contained in:
AUTOMATIC 2022-10-22 20:15:12 +03:00
parent 0df94d3fcf
commit 321bacc6a9

View File

@ -236,11 +236,12 @@ def load_model(checkpoint_info=None):
sd_model.to(shared.device)
sd_hijack.model_hijack.hijack(sd_model)
script_callbacks.model_loaded_callback(sd_model)
sd_model.eval()
shared.sd_model = sd_model
script_callbacks.model_loaded_callback(sd_model)
print(f"Model loaded.")
return sd_model