aboutsummaryrefslogtreecommitdiff
path: root/modules/hypernetwork.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hypernetwork.py')
-rw-r--r--modules/hypernetwork.py7
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