ltdrdata / ComfyUI-Impact-Pack

Custom nodes pack for ComfyUI This custom node helps to conveniently enhance images through Detector, Detailer, Upscaler, Pipe, and more.
GNU General Public License v3.0
1.78k stars 165 forks source link

Is it possible to repeat execution of ImpactWildcardProcessor before the workflow has finished? (Loop testing with Comfy PR#2666) #702

Closed itswhateverman closed 1 month ago

itswhateverman commented 1 month ago

Testing ComfyUI PR#2666 - Execution Inversion in conjunction with ImpactWildcardProcessor.

The goal is to be able to iterate through a batch of Clip text encodes in a for loop as an initial step and then send the accumulated list of conditionings to the sampler for processing, to reduce model loads in Low VRAM scenarios such that Comfy doesn't need to flip back and forth between having the text encoder vs the unet loaded quite as often.

However the ImpactWildcardProcessor doesn't advance and provide a new prompt during the loop, so while the overall logic works, it ultimately sends the same data to the text encode at each iteration of the loop. Is there a way to trigger the ImpactWildcardProcessor to regenerate new output before the workflow execution has finished?

itswhateverman commented 1 month ago

Example workflow: wildcard_loop_example.json

ltdrdata commented 1 month ago

Take a look these solutions. You need to combine these approaches. https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/685 https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/679

guill commented 1 month ago

In case anyone else is looking at this question and needs some additional guidance, here's the "fixed" version of @itswhateverman's example workflow (using @ltdrdata's advice from #685)

fixed_wildcard_loop_example.json