Replies: 2 comments 2 replies
-
I think it would be best to discuss this in the discussion section. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Very interesting perspective! Does anyone have relevant experience? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Feature Idea
I’ve noticed that ComfyUI currently executes tasks sequentially, which limits its efficiency for various use cases. Introducing proper parallelism could lead to significant improvements:
To address this, I suggest considering Ray as the backbone for scaling and parallel execution in ComfyUI. Here are the reasons why Ray is a strong candidate:
Why Use Ray for Scaling in ComfyUI?
Ray is purpose-built for scaling AI and Python applications.
It’s widely adopted in the AI community and has proven scalability features for both single-node and distributed applications.
Ray’s objects system supports lazy evaluation and result caching.
This can enhance execution efficiency for tasks that produce reusable outputs, such as certain node computations.
Similar paradigms: ComfyUI uses ‘nodes,’ and Ray uses ‘actors.’
This similarity makes ComfyUI's workflow easier to adapt to Ray's model, thus simplifying integration.
Ray supports multiple isolated virtual environments.
This feature is especially useful for resolving library/environment conflicts. Currently, ComfyUI manages different custom nodes that could rely on varying versions of the same library. While these do not necessarily cause runtime errors, they often lead to frustrating deprecation warnings. Ray’s isolation capabilities can mitigate this.
Community demand for better parallelism and distribution
As mentioned earlier, the community needs improved parallelism. With Ray, it becomes feasible to distribute tasks across multiple GPUs, CPUs, or even clusters.
If any part of my explanation is unclear, feel free to reach out! I used a translator, so I’d be happy to discuss and refine further if needed. 😊
Existing Solutions
#162
#3538
Other
Key Resources / Links
ray github
ray core doc
SD example
By the way, it might also be worth considering UV for installing custom nodes. UV is increasingly becoming the de facto standard for managing Python dependencies. Integrating UV could provide a cleaner and more efficient method for handling custom node installations.
Beta Was this translation helpful? Give feedback.
All reactions