From 1ce6474eafd9bacf9511b5367b0fadf12621d4f9 Mon Sep 17 00:00:00 2001 From: robotR <3224348+BlinkVoid@users.noreply.github.com> Date: Sat, 10 Jan 2026 23:51:19 +1100 Subject: [PATCH] Fix: utils package shadowed by comfy/utils.py Change sys.path.insert(0, ...) to sys.path.append(...) to prevent the comfy directory from being placed at the front of sys.path. When comfy/ is at position 0, importing 'utils' finds comfy/utils.py (a module file) instead of the top-level utils/ package, causing: ModuleNotFoundError: No module named 'utils.install_util'; 'utils' is not a package This affects imports in app/frontend_management.py and app/database/db.py which import from utils.install_util. By using append() instead of insert(0, ...), the comfy directory is added at the end of sys.path, preserving normal import resolution order. --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 5a9d42d4a..fca98bf79 100644 --- a/nodes.py +++ b/nodes.py @@ -19,7 +19,7 @@ from PIL.PngImagePlugin import PngInfo import numpy as np import safetensors.torch -sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy")) +sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "comfy")) import comfy.diffusers_load import comfy.samplers