diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-09 11:33:22 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-09 11:33:22 +0000 |
commit | 542a3d3a4a00c1383fbdaf938ceefef87cf834bb (patch) | |
tree | 90a5da1db886eb2c09e75075add56c2d2de774f4 /modules/hypernetwork.py | |
parent | 77a719648db515f10136e8b8483d5b16bda2eaeb (diff) | |
download | stable-diffusion-webui-gfx803-542a3d3a4a00c1383fbdaf938ceefef87cf834bb.tar.gz stable-diffusion-webui-gfx803-542a3d3a4a00c1383fbdaf938ceefef87cf834bb.tar.bz2 stable-diffusion-webui-gfx803-542a3d3a4a00c1383fbdaf938ceefef87cf834bb.zip |
fix btoken hypernetworks in XY plot
Diffstat (limited to 'modules/hypernetwork.py')
-rw-r--r-- | modules/hypernetwork.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/hypernetwork.py b/modules/hypernetwork.py index 19f1c227..498bc9d8 100644 --- a/modules/hypernetwork.py +++ b/modules/hypernetwork.py @@ -49,15 +49,18 @@ def list_hypernetworks(path): def load_hypernetwork(filename):
- print(f"Loading hypernetwork {filename}")
path = shared.hypernetworks.get(filename, None)
- if (path is not None):
+ if path is not None:
+ print(f"Loading hypernetwork {filename}")
try:
shared.loaded_hypernetwork = Hypernetwork(path)
except Exception:
print(f"Error loading hypernetwork {path}", file=sys.stderr)
print(traceback.format_exc(), file=sys.stderr)
else:
+ if shared.loaded_hypernetwork is not None:
+ print(f"Unloading hypernetwork")
+
shared.loaded_hypernetwork = None
|