use --enable-manager-legacy-ui cli arg instead of env variable

This commit is contained in:
Dr.Lt.Data 2025-04-15 01:36:35 +09:00
parent 05ceab68f8
commit 1816bb748e

View File

@ -13,18 +13,21 @@ def start():
logging.info('[START] ComfyUI-Manager') logging.info('[START] ComfyUI-Manager')
from .common import cm_global # noqa: F401 from .common import cm_global # noqa: F401
should_show_legacy_manager_front = os.environ.get('ENABLE_LEGACY_COMFYUI_MANAGER_FRONT', 'false') == 'true' or ENABLE_LEGACY_COMFYUI_MANAGER_FRONT_DEFAULT if not args.disable_manager:
if not args.disable_manager and should_show_legacy_manager_front: should_show_legacy_manager_front = args.enable_manager_legacy_ui or ENABLE_LEGACY_COMFYUI_MANAGER_FRONT_DEFAULT
try: if should_show_legacy_manager_front:
from .legacy import manager_server # noqa: F401 try:
from .legacy import share_3rdparty # noqa: F401 from .legacy import manager_server # noqa: F401
import nodes from .legacy import share_3rdparty # noqa: F401
nodes.EXTENSION_WEB_DIRS['comfyui-manager-legacy'] = os.path.join(os.path.dirname(__file__), 'js') import nodes
except Exception as e:
print("Error enabling legacy ComfyUI Manager frontend:", e) logging.info("[ComfyUI-Manager] Legacy UI is enabled.")
else: nodes.EXTENSION_WEB_DIRS['comfyui-manager-legacy'] = os.path.join(os.path.dirname(__file__), 'js')
from .glob import manager_server # noqa: F401 except Exception as e:
from .glob import share_3rdparty # noqa: F401 print("Error enabling legacy ComfyUI Manager frontend:", e)
else:
from .glob import manager_server # noqa: F401
from .glob import share_3rdparty # noqa: F401
def should_be_disabled(fullpath:str) -> bool: def should_be_disabled(fullpath:str) -> bool: