fix aesthetic gradients doing nothing after loading a different model

This commit is contained in:
MrCheeze 2022-10-22 12:59:21 -04:00 committed by AUTOMATIC1111
parent 324c7c732d
commit 0df94d3fcf

View file

@ -236,12 +236,11 @@ 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
@ -268,6 +267,7 @@ def reload_model_weights(sd_model, info=None):
load_model_weights(sd_model, checkpoint_info)
sd_hijack.model_hijack.hijack(sd_model)
script_callbacks.model_loaded_callback(sd_model)
if not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram:
sd_model.to(devices.device)