We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d15b3ec commit 97bc0b9Copy full SHA for 97bc0b9
modules/hypernetwork.py
@@ -1,5 +1,8 @@
1
import glob
2
import os
3
+import sys
4
+import traceback
5
+
6
import torch
7
from modules import devices
8
@@ -36,8 +39,12 @@ def load_hypernetworks(path):
36
39
res = {}
37
40
38
41
for filename in glob.iglob(path + '**/*.pt', recursive=True):
- hn = Hypernetwork(filename)
- res[hn.name] = hn
42
+ try:
43
+ hn = Hypernetwork(filename)
44
+ res[hn.name] = hn
45
+ except Exception:
46
+ print(f"Error loading hypernetwork {filename}", file=sys.stderr)
47
+ print(traceback.format_exc(), file=sys.stderr)
48
49
return res
50
0 commit comments