mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-31 02:32:57 +08:00
call model_loaded_callback after setting shared.sd_model in case scripts refer to it using that
This commit is contained in:
parent
0df94d3fcf
commit
321bacc6a9
@ -236,11 +236,12 @@ 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user