mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
fix: when find already_loaded model, remove loaded by array index
This commit is contained in:
parent
dfbdb5a135
commit
f4633cb9c0
@ -796,7 +796,7 @@ def reuse_model_from_already_loaded(sd_model, checkpoint_info, timer):
|
|||||||
|
|
||||||
if len(model_data.loaded_sd_models) > shared.opts.sd_checkpoints_limit > 0:
|
if len(model_data.loaded_sd_models) > shared.opts.sd_checkpoints_limit > 0:
|
||||||
print(f"Unloading model {len(model_data.loaded_sd_models)} over the limit of {shared.opts.sd_checkpoints_limit}: {loaded_model.sd_checkpoint_info.title}")
|
print(f"Unloading model {len(model_data.loaded_sd_models)} over the limit of {shared.opts.sd_checkpoints_limit}: {loaded_model.sd_checkpoint_info.title}")
|
||||||
model_data.loaded_sd_models.pop()
|
del model_data.loaded_sd_models[i]
|
||||||
send_model_to_trash(loaded_model)
|
send_model_to_trash(loaded_model)
|
||||||
timer.record("send model to trash")
|
timer.record("send model to trash")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user