fix: rename nodes/ -> ri_nodes/, utils/ -> ri_utils/ to avoid collision with ComfyUI's own nodes.py module
This commit is contained in:
+4
-3
@@ -19,13 +19,14 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Ensure this custom-node directory is on sys.path so that the sub-packages
|
||||
# 'nodes' and 'utils' are importable regardless of ComfyUI's working directory.
|
||||
# 'ri_nodes' and 'ri_utils' are importable regardless of ComfyUI's cwd.
|
||||
# We use the prefix 'ri_' to avoid colliding with ComfyUI's own 'nodes.py'.
|
||||
_HERE = Path(__file__).parent.resolve()
|
||||
if str(_HERE) not in sys.path:
|
||||
sys.path.insert(0, str(_HERE))
|
||||
|
||||
from nodes.rotate_image import RotateImage # noqa: E402
|
||||
from nodes.restore_rotated import RestoreRotatedImage # noqa: E402
|
||||
from ri_nodes.rotate_image import RotateImage # noqa: E402
|
||||
from ri_nodes.restore_rotated import RestoreRotatedImage # noqa: E402
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# ComfyUI node registration
|
||||
|
||||
Reference in New Issue
Block a user