32 lines
981 B
Python
32 lines
981 B
Python
"""
|
|
Pixel Sorting - ASDF-style pixel sorting for Python.
|
|
|
|
When this directory is placed in ComfyUI's custom_nodes folder,
|
|
the nodes are automatically registered.
|
|
|
|
For library usage, install with pip and import from 'pixelsort'.
|
|
"""
|
|
|
|
# ComfyUI node registration
|
|
# This is loaded when the directory is in ComfyUI's custom_nodes
|
|
try:
|
|
# Add src to path so we can import pixelsort even when not installed
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
current_dir = Path(__file__).parent
|
|
src_path = current_dir / "src"
|
|
if src_path.exists() and str(src_path) not in sys.path:
|
|
sys.path.insert(0, str(src_path))
|
|
|
|
# Import nodes
|
|
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
|
|
|
|
# ComfyUI will look for these
|
|
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
|
|
|
|
except Exception as e:
|
|
# If we're being imported as a regular package, this is expected
|
|
print(f"Note: ComfyUI nodes not loaded - {e}")
|
|
__all__ = []
|