add --medvram-sdxl

This commit is contained in:
AUTOMATIC1111
2023-08-22 18:49:08 +03:00
parent bb7dd7b646
commit 016554e437
7 changed files with 31 additions and 17 deletions

View File

@@ -263,7 +263,7 @@ def reload_vae_weights(sd_model=None, vae_file=unspecified):
if loaded_vae_file == vae_file:
return
if shared.cmd_opts.lowvram or shared.cmd_opts.medvram:
if sd_model.lowvram:
lowvram.send_everything_to_cpu()
else:
sd_model.to(devices.cpu)
@@ -275,7 +275,7 @@ def reload_vae_weights(sd_model=None, vae_file=unspecified):
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 sd_model.lowvram:
sd_model.to(devices.device)
print("VAE weights loaded.")