Merge pull request #15600 from AUTOMATIC1111/fix-corrupt-model-loop

Fix corrupt model initial load loop
This commit is contained in:
AUTOMATIC1111
2024-06-08 10:12:45 +03:00
committed by GitHub
2 changed files with 17 additions and 15 deletions

View File

@@ -659,10 +659,11 @@ def get_empty_cond(sd_model):
def send_model_to_cpu(m):
if m.lowvram:
lowvram.send_everything_to_cpu()
else:
m.to(devices.cpu)
if m is not None:
if m.lowvram:
lowvram.send_everything_to_cpu()
else:
m.to(devices.cpu)
devices.torch_gc()