From 7ae70d5a4d3253f7e9ddae121502b9ef630bd917 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 8 Oct 2022 13:58:44 +0530 Subject: [PATCH] Don't delete the model variables twice --- ui/sd_internal/runtime.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/sd_internal/runtime.py b/ui/sd_internal/runtime.py index 10ac0576..63506579 100644 --- a/ui/sd_internal/runtime.py +++ b/ui/sd_internal/runtime.py @@ -249,7 +249,6 @@ def do_mk_img(req: Request): device = 'cpu' if model_is_half: - del model, modelCS, modelFS load_model_ckpt(ckpt_to_use, device) needs_model_reload = False @@ -263,7 +262,6 @@ def do_mk_img(req: Request): if (precision == 'autocast' and (req.use_full_precision or not model_is_half)) or \ (precision == 'full' and not req.use_full_precision and not force_full_precision): - del model, modelCS, modelFS load_model_ckpt(ckpt_to_use, device, req.turbo, unet_bs, ('full' if req.use_full_precision else 'autocast')) needs_model_reload = False