mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-17 02:40:56 +01:00
Merge pull request #300 from cmdr2/beta
Don't delete the model variables twice
This commit is contained in:
commit
ad617e0deb
@ -249,7 +249,6 @@ def do_mk_img(req: Request):
|
|||||||
device = 'cpu'
|
device = 'cpu'
|
||||||
|
|
||||||
if model_is_half:
|
if model_is_half:
|
||||||
del model, modelCS, modelFS
|
|
||||||
load_model_ckpt(ckpt_to_use, device)
|
load_model_ckpt(ckpt_to_use, device)
|
||||||
needs_model_reload = False
|
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 \
|
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):
|
(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'))
|
load_model_ckpt(ckpt_to_use, device, req.turbo, unet_bs, ('full' if req.use_full_precision else 'autocast'))
|
||||||
needs_model_reload = False
|
needs_model_reload = False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user