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.91k stars 187 forks source link

Face detailer Looping without giving image #756

Closed Creative-comfyUI closed 1 month ago

Creative-comfyUI commented 1 month ago

Hello,

As usual I connect an image to facedetailer. Facedetailer star rendering not once but several times without stopping to give image. I have to stop the process because it never ends.

Thanks

ltdrdata commented 1 month ago

What is your workflow?

Creative-comfyUI commented 1 month ago

It seems it works well with one image but not with batch image (more than one) The result seems strange. Before their was much better results. Look at the hands workflow-13 Screenshot 2024-09-26 at 12 08 14 AM

ltdrdata commented 1 month ago

It seems it works well with one image but not with batch image (more than one) The result seems strange. Before their was much better results. Look at the hands workflow-13 Screenshot 2024-09-26 at 12 08 14 AM

It's not an issue with batch images. The principle of the detailer is to crop and enlarge a part of the image, perform img2img on it, then reduce it and paste it back into the original image. The prompt applied to the detailer should be appropriately applied from this perspective.

InspectaGadget commented 1 month ago

Hi ! Would to expand on this (initial) issue. I tried to detail on a picture with several faces, applying InstantID on SEGS. In my example there are seven faces, they all refine without problems, but when reaching the last face the detailer don't generate output and comeback to the first one face, continuing to infinity. The cycle is 1 only.

But (and just thinking of that as I write this message) I didn't put a SEGS paste after the detailer. Could it be the reason ? Otherwise, in filtered SEGS I set a count of height, but skip the first one (start =1). Is that this setting that could messed up things in detailer ?

If I refine an only face, there is not any problems.

Sorry by advance, I will be able to link WF only tomorrow. Thanks for your awesome job on this nodes.

InspectaGadget commented 1 month ago

Here is the part of workflow where the issue happened. workflow(2)

PS : And it's cause of this clean GPU i put after the detailer, that maybe erase previous job each time it finish to detail one face, getting it impossible to detail and paste all the faces together -> You could say i'm dumb

ltdrdata commented 1 month ago

The output of SEGPreviewis an image list. This means that the subsequent workflow will be repeated as many times as there are items in SEGS.

InspectaGadget commented 1 month ago

Do you mean it's looping cause SEGPreview is linked to the face keypoints ?

I understand that if SEGS isolate 7 faces, there will be 7 passes of detailer. But there i reached the pass # 32 before I quit.

That should decide the number of passes isn't it the number of SEGS detected from Simple detector or SEGS filtered (wich is the one connected to detailer) ?

ltdrdata commented 1 month ago

Do you mean it's looping cause SEGPreview is linked to the face keypoints ?

I understand that if SEGS isolate 7 faces, there will be 7 passes of detailer. But there i reached the pass # 32 before I quit.

That should decide the number of passes isn't it the number of SEGS detected from Simple detector or SEGS filtered (wich is the one connected to detailer) ?

The basic_pipe passed to the detailer is connected to the output of SEGSPreview. This means that the detailer itself repeats 7 times. Additionally, since the SEGS passed to the detailer contains 7 items, it repeats 7 times within the detailer each time, resulting in a total of 49 repetitions.

InspectaGadget commented 1 month ago

Couldn't manage to figure this keypoints was multiplying numbers of repetitions when going in pipe. Thanks for your explanations and for your patience !