Closed Chaoses-Ib closed 6 months ago
Note that this only makes nodes installable, not necessarily compatible with comfyui
. For example, import folder_paths
won't work. But this can be fixed by adding some paths to sys.path
, or directly modifying sys.modules
, if there are import exceptions or no comfyui
dependency. I'm not sure you like this change or not. If you do, I can contribute it, otherwises I'm ok to implement it in another package.
I realized that all the support for legacy nodes could be put into another package. It can find modules with the entry point comfyui.custom_nodes.legacy
, load them with polyfills, and then pass them back to comfyui
. This approach provides better decoupling and makes the PR to ComfyUI smaller. I'll try to make it, and if it works I'll update this PR then.
This PR adds some docs about making legacy custom nodes installable. It should be helpful for transitioning the custom nodes ecosystem.
By the way, I really love the idea of making ComfyUI a package. Thanks for your work.