chrisgoringe / cg-image-picker

199 stars 13 forks source link

[FEATURE REQUEST] Support for Impact's SEGS #101

Open alessandroperilli opened 2 months ago

alessandroperilli commented 2 months ago

Chris, thanks for sharing with the community this great node suite. I added it to the AP Workflow for ComfyUI long ago and users are very happy with it.

I'm writing to see if you would consider adding support for Impact's SEGS as inputs, on top of images.

A number of Impact's nodes already allow you to automatically choose certain SEGS based on thresholds or other discriminants. For example, in this example from APW, I can automatically choose to process only certain SEGS that equal to faces of a small size:

Screenshot 2024-04-23 at 14 40 57

While this is wonderful to process a large number of images at industrial scale, there are situations where I'd like to manually choose which SEGS (in this example, representing faces) should move forward in the pipeline and which ones shouldn't.

Your Preview Chooser node seems perfect for the job, but it doesn't support SEGS as inputs. Is there any chance you could add this support?

(in the screenshot, for example, I would place the Preview Chooser between node #515 and #546)

Thanks for considering the idea!

chrisgoringe commented 5 days ago

Taken me a while to look at this!

@alessandroperilli , are you happy to try a version on a branch? It's very basic at the moment, but it is working.

If you go into the cg-image-picker subdirectory and do

git pull
git switch segs

then restart comfy. Here's a basic workflow illustrating it...

segs-workflow.json

The way it works is to use the SEGSPreview node, plug it's output image list and the segs into the chooser, and then just take the segs output from the chooser.

Screenshot 2024-07-16 171929