mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 03:10:21 +00:00
rename print_error to report, use it with together with package name
This commit is contained in:
@@ -5,10 +5,10 @@ from PIL import Image
|
||||
from basicsr.utils.download_util import load_file_from_url
|
||||
from realesrgan import RealESRGANer
|
||||
|
||||
from modules.errors import print_error
|
||||
from modules.upscaler import Upscaler, UpscalerData
|
||||
from modules.shared import cmd_opts, opts
|
||||
from modules import modelloader
|
||||
from modules import modelloader, errors
|
||||
|
||||
|
||||
class UpscalerRealESRGAN(Upscaler):
|
||||
def __init__(self, path):
|
||||
@@ -35,7 +35,7 @@ class UpscalerRealESRGAN(Upscaler):
|
||||
self.scalers.append(scaler)
|
||||
|
||||
except Exception:
|
||||
print_error("Error importing Real-ESRGAN", exc_info=True)
|
||||
errors.report("Error importing Real-ESRGAN", exc_info=True)
|
||||
self.enable = False
|
||||
self.scalers = []
|
||||
|
||||
@@ -75,7 +75,7 @@ class UpscalerRealESRGAN(Upscaler):
|
||||
|
||||
return info
|
||||
except Exception:
|
||||
print_error("Error making Real-ESRGAN models list", exc_info=True)
|
||||
errors.report("Error making Real-ESRGAN models list", exc_info=True)
|
||||
return None
|
||||
|
||||
def load_models(self, _):
|
||||
@@ -132,4 +132,4 @@ def get_realesrgan_models(scaler):
|
||||
]
|
||||
return models
|
||||
except Exception:
|
||||
print_error("Error making Real-ESRGAN models list", exc_info=True)
|
||||
errors.report("Error making Real-ESRGAN models list", exc_info=True)
|
||||
|
Reference in New Issue
Block a user