Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How ComfyScript handle the missing node? #17

Open
thhung opened this issue Feb 1, 2024 · 3 comments
Open

How ComfyScript handle the missing node? #17

thhung opened this issue Feb 1, 2024 · 3 comments
Labels
enhancement New feature or request runtime

Comments

@thhung
Copy link

thhung commented Feb 1, 2024

As the title. Do we need to connect to Comfy to install it by ourself? It is more convenience to be able to install all the missing node from ComfyScript.

@Chaoses-Ib Chaoses-Ib added enhancement New feature or request runtime labels Feb 1, 2024
@Chaoses-Ib
Copy link
Owner

Chaoses-Ib commented Feb 1, 2024

Currently, yes. One problem about this is how to handle all the edge cases. Dependencies may be installed by requirements.txt, git submodules and install.py. It's also possible that installing dependencies for one node will break another. And if the node already exists, then updating may be needed. It's a bit complex to handle all these in code robustly.

Another question is how to install nodes if ComfyScript is installed as a package. Many custom nodes don't have pyproject.toml and can't be installed as packages. A temp directory may be needed to clone these nodes.

It's also possible to reuse ComfyUI Manager's data to detect missing nodes, though it's licensed under GPL and I'm not sure if using its data via URL will require changing the license from MIT to GPL too.

Anyway, some basic support will be made in the following versions.

@Chaoses-Ib
Copy link
Owner

Another question is how to install nodes if ComfyScript is installed as a package. Many custom nodes don't have pyproject.toml and can't be installed as packages. A temp directory may be needed to clone these nodes.

For this question, I've found a simple enough way to make nodes installable: hiddenswitch/ComfyUI#2. If ComfyScript is installed as a package, then only installable nodes will be able to be used directly. For nodes that are not installable, the user can fork them and make changes, or clone them themselves and provided the path to load them.

@Chaoses-Ib
Copy link
Owner

One problem about this is how to handle all the edge cases. Dependencies may be installed by requirements.txt, git submodules and install.py. It's also possible that installing dependencies for one node will break another. And if the node already exists, then updating may be needed. It's a bit complex to handle all these in code robustly.

And for this part, I decided to transfer the responsibility to ComfyUI Manager: If ComfyUI Manager is installed, then ComfyScript will call it to install nodes; if not, a list of missing nodes and their repositories will be printed, so that the user can install them manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request runtime
Projects
None yet
Development

No branches or pull requests

2 participants