aboutsummaryrefslogtreecommitdiffstats
path: root/modules/hypernetworks/hypernetwork.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/hypernetworks/hypernetwork.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/hypernetworks/hypernetwork.py')
-rw-r--r--modules/hypernetworks/hypernetwork.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/hypernetworks/hypernetwork.py b/modules/hypernetworks/hypernetwork.py
index fcc1ef20..5d12b449 100644
--- a/modules/hypernetworks/hypernetwork.py
+++ b/modules/hypernetworks/hypernetwork.py
@@ -9,8 +9,7 @@ import torch
import tqdm
from einops import rearrange, repeat
from ldm.util import default
-from modules import devices, processing, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint
-from modules.errors import print_error
+from modules import devices, processing, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint, errors
from modules.textual_inversion import textual_inversion, logging
from modules.textual_inversion.learn_schedule import LearnRateScheduler
from torch import einsum
@@ -329,7 +328,7 @@ def load_hypernetwork(name):
hypernetwork.load(path)
return hypernetwork
except Exception:
- print_error(f"Error loading hypernetwork {path}", exc_info=True)
+ errors.report(f"Error loading hypernetwork {path}", exc_info=True)
return None
@@ -766,7 +765,7 @@ Last saved image: {html.escape(last_saved_image)}<br/>
</p>
"""
except Exception:
- print_error("Exception in training hypernetwork", exc_info=True)
+ errors.report("Exception in training hypernetwork", exc_info=True)
finally:
pbar.leave = False
pbar.close()