mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-04-28 10:11:48 +00:00
rename print_error to report, use it with together with package name
This commit is contained in:
@@ -2,10 +2,9 @@ import os
|
||||
|
||||
from basicsr.utils.download_util import load_file_from_url
|
||||
|
||||
from modules.errors import print_error
|
||||
from modules.upscaler import Upscaler, UpscalerData
|
||||
from ldsr_model_arch import LDSR
|
||||
from modules import shared, script_callbacks
|
||||
from modules import shared, script_callbacks, errors
|
||||
import sd_hijack_autoencoder # noqa: F401
|
||||
import sd_hijack_ddpm_v1 # noqa: F401
|
||||
|
||||
@@ -51,7 +50,7 @@ class UpscalerLDSR(Upscaler):
|
||||
try:
|
||||
return LDSR(model, yaml)
|
||||
except Exception:
|
||||
print_error("Error importing LDSR", exc_info=True)
|
||||
errors.report("Error importing LDSR", exc_info=True)
|
||||
return None
|
||||
|
||||
def do_upscale(self, img, path):
|
||||
|
||||
@@ -9,10 +9,9 @@ from tqdm import tqdm
|
||||
from basicsr.utils.download_util import load_file_from_url
|
||||
|
||||
import modules.upscaler
|
||||
from modules import devices, modelloader, script_callbacks
|
||||
from modules import devices, modelloader, script_callbacks, errors
|
||||
from scunet_model_arch import SCUNet as net
|
||||
|
||||
from modules.errors import print_error
|
||||
from modules.shared import opts
|
||||
|
||||
|
||||
@@ -39,7 +38,7 @@ class UpscalerScuNET(modules.upscaler.Upscaler):
|
||||
scaler_data = modules.upscaler.UpscalerData(name, file, self, 4)
|
||||
scalers.append(scaler_data)
|
||||
except Exception:
|
||||
print_error(f"Error loading ScuNET model: {file}", exc_info=True)
|
||||
errors.report(f"Error loading ScuNET model: {file}", exc_info=True)
|
||||
if add_model2:
|
||||
scaler_data2 = modules.upscaler.UpscalerData(self.model_name2, self.model_url2, self)
|
||||
scalers.append(scaler_data2)
|
||||
|
||||
Reference in New Issue
Block a user