Skip to content

Conversation

XmYx
Copy link

@XmYx XmYx commented Sep 16, 2025

[update for current ComfyUI version] Grouping Models during execution to reduce the amount of RAM/VRAM passing, speeding up execution of graphs containing the same model.

[update for current ComfyUI version] Grouping Models during execution to reduce the amount of RAM/VRAM passing, speeding up execution of graphs containing the same model.
@Kosinkadink
Copy link
Collaborator

Kosinkadink commented Sep 18, 2025

Hey, to demonstrate the execution optimization, would you be able to do some comparisons between this PR and current code by using comfyui-benchmark? This will help a ton in the review process. Thanks!

edit: Basically, you'd just need to install the nodepack, and then it will automatically put .json benchmark data into output/benchmarks directory that you can submit here. You don't need to worry about visualizing the data yourself, although if you read the README of comfyui-benchmark you are free to do so!

@Kosinkadink Kosinkadink self-requested a review September 30, 2025 03:43
@XmYx
Copy link
Author

XmYx commented Oct 14, 2025

Sure thing!

To make it worthy, I have tested with 6 x Qwen Image generations on the same graph.
Initial result is 237s with the original graph.py, and 167s after adding the optimization found in this PR, basically just groups the models to execute by model name and inputs being solved of course.

benchmark_20251014_150924_VANILLA_237s.json
benchmark_20251014_151419_OPTIM_167s.json

remove printed logs
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.

2 participants