aboutsummaryrefslogtreecommitdiffstats
path: root/modules/gfpgan_model.py
diff options
context:
space:
mode:
authorpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2022-12-10 08:02:39 +0000
committerGitHub <noreply@github.com>2022-12-10 08:02:39 +0000
commit6387043fd2c3311d66690ff27d7da0e030b29cd8 (patch)
tree075559ce3e52511cdd459da2b4cc33360d6eb258 /modules/gfpgan_model.py
parent00ebc26c4e2962a31e067539d89cd695d999539a (diff)
parent1d01404c5615debfca24f7fbe429ddd2f5b11eb9 (diff)
downloadstable-diffusion-webui-gfx803-6387043fd2c3311d66690ff27d7da0e030b29cd8.tar.gz
stable-diffusion-webui-gfx803-6387043fd2c3311d66690ff27d7da0e030b29cd8.tar.bz2
stable-diffusion-webui-gfx803-6387043fd2c3311d66690ff27d7da0e030b29cd8.zip
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'modules/gfpgan_model.py')
-rw-r--r--modules/gfpgan_model.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gfpgan_model.py b/modules/gfpgan_model.py
index a9452dce..1e2dbc32 100644
--- a/modules/gfpgan_model.py
+++ b/modules/gfpgan_model.py
@@ -36,7 +36,9 @@ def gfpgann():
else:
print("Unable to load gfpgan model!")
return None
- model = gfpgan_constructor(model_path=model_file, upscale=1, arch='clean', channel_multiplier=2, bg_upsampler=None)
+ if hasattr(facexlib.detection.retinaface, 'device'):
+ facexlib.detection.retinaface.device = devices.device_gfpgan
+ model = gfpgan_constructor(model_path=model_file, upscale=1, arch='clean', channel_multiplier=2, bg_upsampler=None, device=devices.device_gfpgan)
loaded_gfpgan_model = model
return model