-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path__init__.py
More file actions
79 lines (64 loc) · 2.48 KB
/
__init__.py
File metadata and controls
79 lines (64 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
"""
Luminance Stack Processor - ComfyUI Custom Nodes
Professional HDR processing nodes using the Debevec Algorithm
This module provides two custom nodes for ComfyUI:
1. Luminance Stack Processor (3 Stops) - For processing EV+2, EV+0, EV-2 exposures
2. Luminance Stack Processor (5 Stops) - For processing EV+4, EV+2, EV+0, EV-2, EV-4 exposures
Requirements:
- OpenCV (cv2) - NumPy and PyTorch are provided by ComfyUI
Installation:
1. Place this folder in your ComfyUI/custom_nodes/ directory
2. Install OpenCV: python_embeded\python.exe -m pip install opencv-python (for portable)
3. Restart ComfyUI
Author: Sumit Chatterjee
Version: 1.1.8
License: MIT
"""
import os
import sys
# Import version information
try:
from .version import __version__, get_version_string, get_full_version_info
except ImportError:
__version__ = "1.0.0"
get_version_string = lambda: f"v{__version__}"
get_full_version_info = lambda: {"version": __version__}
# Add current directory to Python path for imports
current_dir = os.path.dirname(os.path.realpath(__file__))
if current_dir not in sys.path:
sys.path.insert(0, current_dir)
try:
# Import the node classes
from .luminance_stack_processor import (
LuminanceStackProcessor3Stops,
LuminanceStackProcessor5Stops,
LatentStackProcessor5Stops,
NODE_CLASS_MAPPINGS as NODES,
NODE_DISPLAY_NAME_MAPPINGS as DISPLAY_NAMES
)
# Export the mappings that ComfyUI expects
NODE_CLASS_MAPPINGS = NODES
NODE_DISPLAY_NAME_MAPPINGS = DISPLAY_NAMES
print("✅ Luminance Stack Processor nodes loaded successfully!")
print(f" - Version: {get_version_string()}")
print(f" - Available nodes: {list(NODE_CLASS_MAPPINGS.keys())}")
except ImportError as e:
print(f"❌ Failed to import Luminance Stack Processor nodes: {e}")
print(" Please ensure OpenCV is installed:")
print(" For ComfyUI Portable: python_embeded\\python.exe -m pip install opencv-python")
print(" For Standard ComfyUI: pip install opencv-python")
# Provide empty mappings to prevent ComfyUI errors
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
except Exception as e:
print(f"❌ Unexpected error loading Luminance Stack Processor nodes: {e}")
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
# Metadata for ComfyUI
__all__ = [
'NODE_CLASS_MAPPINGS',
'NODE_DISPLAY_NAME_MAPPINGS',
'__version__'
]
# Version info for external access
__version__ = __version__