Autodetect IPEX

This commit is contained in:
Disty0
2023-07-04 23:37:36 +03:00
parent 875d0db103
commit 966eed8dd9
15 changed files with 55 additions and 55 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ def setup_model(dirname):
output = self.net(cropped_face_t, w=w if w is not None else shared.opts.code_former_weight, adain=True)[0]
restored_face = tensor2img(output, rgb2bgr=True, min_max=(-1, 1))
del output
if cmd_opts.use_ipex:
if devices.backend == 'ipex':
torch.xpu.empty_cache()
else:
torch.cuda.empty_cache()