ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Support for async execution functions

Open guill opened this issue 5 months ago • 1 comments

This commit adds support for node execution functions defined as async. When a node's execution function is defined as async, we can continue executing other nodes while it is processing.

Standard uses of await should "just work", but people will still have to be careful if they spawn actual threads. Because torch doesn't really have async/await versions of functions, this won't particularly help with most locally-executing nodes, but it does work for e.g. web requests to other machines.

In addition to the execute function, the VALIDATE_INPUTS and check_lazy_status functions can also be defined as async, though we'll only resolve one node at a time right now for those.

guill avatar Jun 14 '25 04:06 guill

Currently the plan is to merge this after Subgraph is released.

robinjhuang avatar Jun 19 '25 23:06 robinjhuang

Closing in favor of this rebased PR: https://github.com/comfyanonymous/ComfyUI/pull/8830

guill avatar Jul 08 '25 07:07 guill

Hi I am a small filmmaker want to use ComfyUI to generate few shots up to 15 seconds. I have a very basic knowledge of Python, I have setup my Laptop Corei7, 24GB RAM, RTX 4060 with 8 GB VRAM, till now I am not able to run ComfyUI fully functional on my laptop due to incompatibility with various Python dependencies, Can anyone guide me how to setup ComfyUI so that I may try to generate a video from text or image

nikunjverma avatar Aug 28 '25 18:08 nikunjverma