Files
teddy1565-ComfyUI-AsyncOutput/README.md
T
2026-03-26 02:27:50 +08:00

1.0 KiB

# ComfyUI-AsyncOutput

Simple collect all batch output, then convert to a string list

Like ECMAScript Promise.all

const tasks_queue: Array<Promise<string>> = [];
for (let i = 0; i < n; i++) {
    const task = new Promise<string>((resolve, reject) => {
        /* Your jobs, just a mock, */
    });
    tasks_queue.push(task);
}

/*
results will be an Array<string>
*/
Promise.all(tasks_queue).then((results) => {
    const ffmpeg_concat_input_str = results.join("\n");
    // others
})