mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-16 08:12:12 +03:00
fix aesthetic gradients doing nothing after loading a different model
This commit is contained in:
parent
324c7c732d
commit
0df94d3fcf
@ -236,12 +236,11 @@ def load_model(checkpoint_info=None):
|
|||||||
sd_model.to(shared.device)
|
sd_model.to(shared.device)
|
||||||
|
|
||||||
sd_hijack.model_hijack.hijack(sd_model)
|
sd_hijack.model_hijack.hijack(sd_model)
|
||||||
|
script_callbacks.model_loaded_callback(sd_model)
|
||||||
|
|
||||||
sd_model.eval()
|
sd_model.eval()
|
||||||
shared.sd_model = sd_model
|
shared.sd_model = sd_model
|
||||||
|
|
||||||
script_callbacks.model_loaded_callback(sd_model)
|
|
||||||
|
|
||||||
print(f"Model loaded.")
|
print(f"Model loaded.")
|
||||||
return sd_model
|
return sd_model
|
||||||
|
|
||||||
@ -268,6 +267,7 @@ def reload_model_weights(sd_model, info=None):
|
|||||||
load_model_weights(sd_model, checkpoint_info)
|
load_model_weights(sd_model, checkpoint_info)
|
||||||
|
|
||||||
sd_hijack.model_hijack.hijack(sd_model)
|
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:
|
if not shared.cmd_opts.lowvram and not shared.cmd_opts.medvram:
|
||||||
sd_model.to(devices.device)
|
sd_model.to(devices.device)
|
||||||
|
Loading…
Reference in New Issue
Block a user