aboutsummaryrefslogtreecommitdiffstats
path: root/modules/codeformer_model.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-31 16:56:37 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-05-31 16:56:37 +0000
commit05933840f0676dd1a90a7e2ad3f2a0672624b2cd (patch)
tree593940d16fdc678c275b2b2f21ac6df7c6aad959 /modules/codeformer_model.py
parentd67ef01f629d2034fb847dae6aa0143c87161b8f (diff)
downloadstable-diffusion-webui-gfx803-05933840f0676dd1a90a7e2ad3f2a0672624b2cd.tar.gz
stable-diffusion-webui-gfx803-05933840f0676dd1a90a7e2ad3f2a0672624b2cd.tar.bz2
stable-diffusion-webui-gfx803-05933840f0676dd1a90a7e2ad3f2a0672624b2cd.zip
rename print_error to report, use it with together with package name
Diffstat (limited to 'modules/codeformer_model.py')
-rw-r--r--modules/codeformer_model.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/codeformer_model.py b/modules/codeformer_model.py
index 76143e9f..4260b016 100644
--- a/modules/codeformer_model.py
+++ b/modules/codeformer_model.py
@@ -5,8 +5,7 @@ import torch
import modules.face_restoration
import modules.shared
-from modules import shared, devices, modelloader
-from modules.errors import print_error
+from modules import shared, devices, modelloader, errors
from modules.paths import models_path
# codeformer people made a choice to include modified basicsr library to their project which makes
@@ -105,7 +104,7 @@ def setup_model(dirname):
del output
torch.cuda.empty_cache()
except Exception:
- print_error('Failed inference for CodeFormer', exc_info=True)
+ errors.report('Failed inference for CodeFormer', exc_info=True)
restored_face = tensor2img(cropped_face_t, rgb2bgr=True, min_max=(-1, 1))
restored_face = restored_face.astype('uint8')
@@ -134,6 +133,6 @@ def setup_model(dirname):
shared.face_restorers.append(codeformer)
except Exception:
- print_error("Error setting up CodeFormer", exc_info=True)
+ errors.report("Error setting up CodeFormer", exc_info=True)
# sys.path = stored_sys_path