Commit 2b717bb1 authored by w-e-w's avatar w-e-w

fix initial corrupt model loop

if for some reason the initial loading model at loading phase of webui  is corrupted
after entering this state the user will not be able to load even a good model is selected, due the the unload_model_weights  > send_model_to_cpu > m.lowvram attribute check will fail becaules m is None
webui will be stuck in the loop unable to recover without manual intervention
parent ddb28b33
...@@ -659,6 +659,7 @@ def get_empty_cond(sd_model): ...@@ -659,6 +659,7 @@ def get_empty_cond(sd_model):
def send_model_to_cpu(m): def send_model_to_cpu(m):
if m is not None:
if m.lowvram: if m.lowvram:
lowvram.send_everything_to_cpu() lowvram.send_everything_to_cpu()
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment