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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Nodes package for rotate-image ComfyUI custom nodes
|
||||
# ri_nodes package for rotate-image ComfyUI custom nodes
|
||||
from .rotate_image import RotateImage
|
||||
from .restore_rotated import RestoreRotatedImage
|
||||
|
||||
@@ -13,7 +13,7 @@ from typing import Optional, Tuple
|
||||
|
||||
import torch
|
||||
|
||||
from utils.rotation import (
|
||||
from ri_utils.rotation import (
|
||||
DEFAULT_INTERPOLATION,
|
||||
INTERPOLATION_METHODS,
|
||||
center_crop,
|
||||
@@ -11,7 +11,7 @@ from typing import Optional, Tuple
|
||||
|
||||
import torch
|
||||
|
||||
from utils.rotation import (
|
||||
from ri_utils.rotation import (
|
||||
DEFAULT_INTERPOLATION,
|
||||
INTERPOLATION_METHODS,
|
||||
center_crop,
|
||||
@@ -1,4 +1,4 @@
|
||||
# Utils package for rotate-image ComfyUI custom nodes
|
||||
# ri_utils package for rotate-image ComfyUI custom nodes
|
||||
from .rotation import (
|
||||
INTERPOLATION_METHODS,
|
||||
rotate_pil_image,
|
||||
Reference in New Issue
Block a user