Skip to content

Commit b998059

Browse files
Refuse to load api nodes on old pyav version. (#7981)
1 parent 16417b4 commit b998059

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

comfy_api_nodes/canary.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import av
2+
3+
ver = av.__version__.split(".")
4+
if int(ver[0]) < 14:
5+
raise Exception("INSTALL NEW VERSION OF PYAV TO USE API NODES.")
6+
7+
if int(ver[0]) == 14 and int(ver[1]) < 2:
8+
raise Exception("INSTALL NEW VERSION OF PYAV TO USE API NODES.")
9+
10+
NODE_CLASS_MAPPINGS = {}

nodes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,6 +2289,9 @@ def init_builtin_api_nodes():
22892289
"nodes_pika.py",
22902290
]
22912291

2292+
if not load_custom_node(os.path.join(api_nodes_dir, "canary.py"), module_parent="comfy_api_nodes"):
2293+
return api_nodes_files
2294+
22922295
import_failed = []
22932296
for node_file in api_nodes_files:
22942297
if not load_custom_node(os.path.join(api_nodes_dir, node_file), module_parent="comfy_api_nodes"):

0 commit comments

Comments
 (0)