fix aesthetic gradients doing nothing after loading a different model
This commit is contained in:
parent
324c7c732d
commit
0df94d3fcf
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue