refactor: unify standalone mode check using environment variable

This commit is contained in:
Will Miao
2025-09-21 22:45:11 +08:00
parent 7e20f738fb
commit fec85bcc08
8 changed files with 15 additions and 12 deletions

View File

@@ -4,6 +4,9 @@ import sys
import json
from py.middleware.cache_middleware import cache_control
# Set environment variable to indicate standalone mode
os.environ["COMFYUI_LORA_MANAGER_STANDALONE"] = "1"
# Create mock modules for py/nodes directory - add this before any other imports
def mock_nodes_directory():
"""Create mock modules for all Python files in the py/nodes directory"""