support detecting midas model

fix broken api for checkpoint list
This commit is contained in:
AUTOMATIC
2023-01-27 11:54:19 +03:00
parent d2ac95fa7b
commit 6f31d2210c
3 changed files with 11 additions and 8 deletions

View File

@@ -439,12 +439,12 @@ def reload_model_weights(sd_model=None, info=None):
if sd_model.sd_model_checkpoint == checkpoint_info.filename:
return
if shared.cmd_opts.lowvram or shared.cmd_opts.medvram:
lowvram.send_everything_to_cpu()
else:
sd_model.to(devices.cpu)
if shared.cmd_opts.lowvram or shared.cmd_opts.medvram:
lowvram.send_everything_to_cpu()
else:
sd_model.to(devices.cpu)
sd_hijack.model_hijack.undo_hijack(sd_model)
sd_hijack.model_hijack.undo_hijack(sd_model)
timer = Timer()