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

Load only needed custom-nodes by passing it as cli args #6527

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ruucm
Copy link
Contributor

@ruucm ruucm commented Jan 20, 2025

Our custom_nodes are becoming heavier and heavier.

to reduce the app's startup time, I suggest using this arg option.

Here is an example of usage.

python main.py --custom-nodes comfyui-impact-pack ComfyUI-Manager ComfyUI_Comfyroll_CustomNodes ComfyUI_ADV_CLIP_emb bilbox-comfyui cg-use-everywhere

@ruucm ruucm requested a review from comfyanonymous as a code owner January 20, 2025 02:58
@asagi4
Copy link
Contributor

asagi4 commented Jan 20, 2025

This would be useful to cut down iteration times when developing custom nodes since you might be restarting ComfyUI quite a lot, and moving other custom nodes out of the way every time you want to work on one of your own is a bit bothersome.

@ltdrdata
Copy link
Collaborator

It would be even better if a feature to load a custom node list file were provided.

@asagi4
Copy link
Contributor

asagi4 commented Jan 20, 2025

@ltdrdata you can always just do python main.py --custom-nodes $(cat file), though it won't bother me if files are supported in addition to node names.

@ltdrdata
Copy link
Collaborator

@ltdrdata you can always just do python main.py --custom-nodes $(cat file), though it won't bother me if files are supported in addition to node names.

We need to consider multiplatform environment.

@ruucm
Copy link
Contributor Author

ruucm commented Jan 21, 2025

Could you tell me more about multiplatforms? @ltdrdata

I'm thinking about this mainly for serverless platforms

Most of serverless ComfyUI platforms use the python main.py command everytime when user starts to wake up the container.

it is really gpu container consuming.

I started to use this changes to dynamically only needed custom nodes by passing it like

https://mycomfyui.com/?workflow=FaceDetail&custom_nodes=ComfyUI_ADV_CLIP_emb,comfyui-deploy,ComfyUI_Comfyroll_CustomNodes,comfyui-art-venture,ComfyUI_IPAdapter_plus,ComfyUI_FaceAnalysis,was-node-suite-comfyui,bilbox-comfyui,ComfyUI-Impact-Pack,cg-use-everywhere

And it reduces the wake up time from 3 mins to 20 secs!

@ltdrdata
Copy link
Collaborator

Could you tell me more about multiplatforms? @ltdrdata

I'm thinking about this mainly for serverless platforms

Most of serverless ComfyUI platforms use the python main.py command everytime when user starts to wake up the container.

it is really gpu container consuming.

I started to use this changes to dynamically only needed custom nodes by passing it like

https://mycomfyui.com/?workflow=FaceDetail&custom_nodes=ComfyUI_ADV_CLIP_emb,comfyui-deploy,ComfyUI_Comfyroll_CustomNodes,comfyui-art-venture,ComfyUI_IPAdapter_plus,ComfyUI_FaceAnalysis,was-node-suite-comfyui,bilbox-comfyui,ComfyUI-Impact-Pack,cg-use-everywhere

And it reduces the wake up time from 3 mins to 20 secs!

Does this feature necessarily have to be serverless?

I had also envisioned this feature, but I was thinking of using it for purposes like switching node packs, testing, or switching the work environment itself.

@asagi4
Copy link
Contributor

asagi4 commented Jan 21, 2025

We need to consider multiplatform environment.

There are equivalents on all platforms; I think cat works directly in powershell too, as an alias to Get-Content.
I'm not the one making decisions, but it just feels like it would be unnecessary code for a use case that's easily handled by any shell.

@ltdrdata
Copy link
Collaborator

We need to consider multiplatform environment.

There are equivalents on all platforms; I think cat works directly in powershell too, as an alias to Get-Content.
I'm not the one making decisions, but it just feels like it would be unnecessary code for a use case that's easily handled by any shell.

Providing different usage methods for each environment can be a challenging task.
I would prefer it to be as OS-independent as possible. From that perspective, I believe it's better to offer CLI arguments that do not rely on the shell.

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.

3 participants