28 lines
725 B
Python
28 lines
725 B
Python
# only import if running as a custom node
|
|
try:
|
|
import comfy.utils
|
|
except ImportError:
|
|
pass
|
|
else:
|
|
WEB_DIRECTORY = "./web"
|
|
NODE_CLASS_MAPPINGS = {}
|
|
|
|
# main nodes (no deps)
|
|
from .nodes.mod import NODE_CLASS_MAPPINGS as mod_nodes
|
|
NODE_CLASS_MAPPINGS.update(mod_nodes)
|
|
|
|
# pypng dep
|
|
try:
|
|
import png
|
|
except ImportError:
|
|
print("ColorMod: Can't find pypng! Please install to enable 16bit image support.")
|
|
else:
|
|
# 10bit PNG nodes
|
|
from .nodes.save_png import NODE_CLASS_MAPPINGS as save_png_nodes
|
|
NODE_CLASS_MAPPINGS.update(save_png_nodes)
|
|
|
|
|
|
# export
|
|
NODE_DISPLAY_NAME_MAPPINGS = {k:v.TITLE for k,v in NODE_CLASS_MAPPINGS.items()}
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|