mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-02-20 14:51:36 -08:00
rename print_error to report, use it with together with package name
This commit is contained in:
parent
d67ef01f62
commit
05933840f0
24 changed files with 69 additions and 90 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue