Skip to content

Commit

Permalink
clean __init__.py
Browse files Browse the repository at this point in the history
removed unused imports and reformat.
  • Loading branch information
bmad4ever committed Sep 29, 2023
1 parent 463bfd3 commit 7e017e6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#import traceback

loaded = []
not_loaded = []
exceptions = []


try:
from .api_nodes import NODE_CLASS_MAPPINGS as api

loaded.append(f"api nodes ({len([*api])})")
except Exception as e:
api = {}
Expand All @@ -15,6 +13,7 @@

try:
from .simple_utilities import NODE_CLASS_MAPPINGS as simple

loaded.append(f"simple utility nodes ({len([*simple])})")
except Exception as e:
simple = {}
Expand All @@ -23,6 +22,7 @@

try:
from .cv_nodes import NODE_CLASS_MAPPINGS as cv_nodes

loaded.append(f"CV nodes ({len([*cv_nodes])})")
except Exception as e:
cv_nodes = {}
Expand All @@ -31,6 +31,7 @@

try:
from .color_clip_ade20k import NODE_CLASS_MAPPINGS as cc_ade20k

loaded.append("color clip ade20k node (1)")
except Exception as e:
cc_ade20k = {}
Expand All @@ -39,17 +40,14 @@

try:
from .extension_dependant_utilities import NODE_CLASS_MAPPINGS as extended

loaded.append(f"extension dependent nodes ({len([*extended])})")
except Exception as e:
extended = {}
not_loaded.append("extension dependent nodes")
exceptions.append(e)



import __main__
import nodes
import os

NODE_CLASS_MAPPINGS = {**api, **simple, **cv_nodes, **cc_ade20k, **extended}
WEB_DIRECTORY = "js"
Expand All @@ -60,7 +58,7 @@
print('\n\033[1mFrom Bmad Custom Nodes\033[0m')

if not hasattr(nodes, "EXTENSION_WEB_DIRS"):
exceptions.append(f"The version of ComfyUI is outdated. Some nodes won't work as intended.")
exceptions.append(f"The version of ComfyUI is outdated. Some nodes won't work as intended.")

print(f' \033[92mLoaded {len([*NODE_CLASS_MAPPINGS])} nodes:')
for m in loaded:
Expand Down

0 comments on commit 7e017e6

Please sign in to comment.