diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-31 16:16:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 16:16:14 +0000 |
commit | d9bd7ada7675d3903181a6a65ba625d82cf88443 (patch) | |
tree | 30470f64d84cadc4140023c0bf34c35bb68f79b0 /modules/sd_hijack_optimizations.py | |
parent | 78a602ae8c006077ca93913576335a3a33dba7cb (diff) | |
parent | 52b8752e6201e24c783f674f8dc0681027e10ea9 (diff) | |
download | stable-diffusion-webui-gfx803-d9bd7ada7675d3903181a6a65ba625d82cf88443.tar.gz stable-diffusion-webui-gfx803-d9bd7ada7675d3903181a6a65ba625d82cf88443.tar.bz2 stable-diffusion-webui-gfx803-d9bd7ada7675d3903181a6a65ba625d82cf88443.zip |
Merge pull request #10820 from akx/report-error
Add & use modules.errors.print_error
Diffstat (limited to 'modules/sd_hijack_optimizations.py')
-rw-r--r-- | modules/sd_hijack_optimizations.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/sd_hijack_optimizations.py b/modules/sd_hijack_optimizations.py index 2ec0b049..fd186fa2 100644 --- a/modules/sd_hijack_optimizations.py +++ b/modules/sd_hijack_optimizations.py @@ -1,7 +1,5 @@ from __future__ import annotations
import math
-import sys
-import traceback
import psutil
import torch
@@ -11,6 +9,7 @@ from ldm.util import default from einops import rearrange
from modules import shared, errors, devices, sub_quadratic_attention
+from modules.errors import print_error
from modules.hypernetworks import hypernetwork
import ldm.modules.attention
@@ -140,8 +139,7 @@ if shared.cmd_opts.xformers or shared.cmd_opts.force_enable_xformers: import xformers.ops
shared.xformers_available = True
except Exception:
- print("Cannot import xformers", file=sys.stderr)
- print(traceback.format_exc(), file=sys.stderr)
+ print_error("Cannot import xformers", exc_info=True)
def get_available_vram():
|