From 25e7d953d57d8121b3dcb9906c93b09497d50946 Mon Sep 17 00:00:00 2001 From: facok <128763816+facok@users.noreply.github.com> Date: Mon, 23 Mar 2026 03:01:19 +0800 Subject: [PATCH] Register sys.modules alias so other plugins can import ComfyUI_LCS ComfyUI loads custom_nodes by directory name (ComfyUI-LCS) but Python cannot import module names with hyphens. Register ComfyUI_LCS as a sys.modules alias so SubspaceLab and other plugins can use `from ComfyUI_LCS.core.xxx import ...` regardless of load order. --- __init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/__init__.py b/__init__.py index 7d63482..70ba747 100644 --- a/__init__.py +++ b/__init__.py @@ -3,6 +3,10 @@ Paper: "The Latent Color Subspace" (arXiv:2603.12261v1, ICML 2026) """ +# Register as ComfyUI_LCS so other plugins can `from ComfyUI_LCS.core.xxx import ...` +import sys as _sys +_sys.modules.setdefault("ComfyUI_LCS", _sys.modules[__name__]) + # V3 ComfyExtension entry point from comfy_api.latest import ComfyExtension, io from .nodes.calibrate import LCSLoadData