Skip to content

Conversation

@louis-she
Copy link

@louis-she louis-she commented Oct 8, 2024

在 ComfyUI 的 Node 插件机制下,绝对路径 import 会带来很多问题,比如

from utils import path_to_image

会找到 ComfyUI 的 utils.py 而不是节点的,包括很多其他的地方,直接暴力使用 sys.path.insert(0, xxx) 并不是个好的实践,因为会导致其他节点发生莫名其妙的问题,在节点内部全部使用相对 import 才是最优解。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant