aboutsummaryrefslogtreecommitdiff
path: root/modules/hypernetwork.py
diff options
context:
space:
mode:
authorvictorca25 <41912303+victorca25@users.noreply.github.com>2022-10-09 14:11:22 +0200
committerGitHub <noreply@github.com>2022-10-09 14:11:22 +0200
commit53154ba10a2d4bf716046abec3da0eca91bcc001 (patch)
treeeeed0b11b4e5cae7a441992b0ae07bfe65212413 /modules/hypernetwork.py
parentad4de819c43997f2666b5bad95301f5c37f9018e (diff)
parent9d1138e2940c4ddcd2685bcba12c7d407e9e0ec5 (diff)
Merge branch 'master' into esrgan_mod
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