-
Notifications
You must be signed in to change notification settings - Fork 98
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
Somehow rgthree execution patch blow up when running this workflow. #118
Comments
This is a huge workflow, and something that is probably giving ComfyUI some issues. @Pojo267 - were you iterating on this? Was there a recent point this was working? this could be a bug in the optimization patch, but my first guess is that the structure of highway nodes and the size of this workflow here is the first problem. Regardless, the first step would be to turn off the optimization patch via rgthree config:
Now, for both @Trung0246 and @Pojo267 here's why this workflow may cause problems... ComfyUI's recursive execution is incredibly inefficient. It doesn't matter so much for standard workflows, but once nodes with many inputs/outputs are used it becomes unusable; 15 minutes spent for an actual 2 minute model execution just to recursively evaluate the graph. The optimization I've added should make this 1000's of times faster by caching results (which, since the graph isn't changing should be stable). This is especially true when using nodes with many inputs and outputs, like the rgthree Context nodes or, here, the @Trung0246 highway nodes. Each node highway node here is creating multiple branches, which are then added to possible paths to get to that final Save node. So, when comfy's asking "how many possible paths does it take to get to this Save node" the answer is incredibly large. So, first step would be turning off the optimization in the But, if you still get an overflow, then there's not much more to do without completely rewriting ComfyUI's graph evaluation (the rgthree patch is an outward-in fix). (Note, it's possible the terminal will not show any change for many, many minutes. Just hit queue and walk away; you'll be tempted to cancel the execution if you're waiting (as I was, many times, before digging into the execution).) I can't get the workflow running myself, but let me know how it goes. I'm interested to see what happens here. |
For posterity, here's the initial issue I opened on the execution slowness: comfyanonymous/ComfyUI#1502 |
Reference: Trung0246/ComfyUI-0246#20
I also tried to run the workflow by myself. The cache looks weird:
It looks like exponential growth. Unsure how to move this forward.
The text was updated successfully, but these errors were encountered: