-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
27 lines (22 loc) · 996 Bytes
/
Copy path__init__.py
File metadata and controls
27 lines (22 loc) · 996 Bytes
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
import importlib.util
import subprocess
import sys
import os
def check_and_install_requirements():
try:
# Check for critical dependencies
import google.genai
import loguru
except ImportError:
print("ComfyUI-TimNodes: Dependencies missing. Installing from requirements.txt...")
req_path = os.path.join(os.path.dirname(__file__), "requirements.txt")
if os.path.exists(req_path):
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", req_path])
print("ComfyUI-TimNodes: Dependencies installed. Restarting ComfyUI might be required if it still fails.")
except Exception as e:
print(f"ComfyUI-TimNodes: Failed to auto-install requirements: {e}")
check_and_install_requirements()
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
WEB_DIRECTORY = "js"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]