Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Segment only largest finding - very useful to inpaint main face only #287

Closed
FurkanGozukara opened this issue Sep 26, 2024 · 7 comments
Closed
Labels
C# This pertains to the C# engine Feature New feature or request Python This pertains to the python code (Comfy)

Comments

@FurkanGozukara
Copy link

Feature Idea

Currently I couldn't find a way to inpaint largest face only

It also doesn't sort them from largest to smallest - this would also work

So if you can tell me which files to modify to add this feature I can also try to make a pull request

But I would appreciate very much if you had added it

Use cases

<segment:yolo-face_yolov9c.pt-largest,0.6,0.9>

or

<segment:yolo-face_yolov9c.pt-1,0.6,0.9> - auto sorted by largest and first one inpainted

Other

No response

@FurkanGozukara FurkanGozukara added the Feature New feature or request label Sep 26, 2024
@mcmonkey4eva mcmonkey4eva added C# This pertains to the C# engine Python This pertains to the python code (Comfy) labels Sep 26, 2024
@mcmonkey4eva
Copy link
Member

The actual impl has to be in the swarm yolo python node, but it also needs a new parameter added, probably just a Segmentation Sort Order param under Regional Prompting group to select between sort by left-right vs top-bottom vs largest-smallest

@FurkanGozukara
Copy link
Author

FurkanGozukara commented Sep 26, 2024

The actual impl has to be in the swarm yolo python node, but it also needs a new parameter added, probably just a Segmentation Sort Order param under Regional Prompting group to select between sort by left-right vs top-bottom vs largest-smallest

ok so i need to modify

src\BuiltinExtensions\ComfyUIBackend\ExtraNodes\SwarmComfyExtra\SwarmYolo.py

and the other file name? full path please

and 1 more thing. lets say i modified these files what do i need to do to make them effective without entirely restarting the application?

@abaddouh
Copy link

src/Text2Image/T2IParamTypes.cs starting around line 612

@mcmonkey4eva
Copy link
Member

and the workflow generator code

and there's a launch-windows-dev script to apply updates. You do need a restart that's not avoidable.

@FurkanGozukara
Copy link
Author

FurkanGozukara commented Sep 26, 2024

and the workflow generator code

and there's a launch-windows-dev script to apply updates. You do need a restart that's not avoidable.

thank you from which file it will take the input?

<segment:yolo-face_yolov9c.pt-1,0.6,0.9,true>

something like this i am guessing

image

ye i am missing more files that are used in the process

for example which file translate this input and calls SwarmYolo.py

@FurkanGozukara
Copy link
Author

thank you so much @aimerib

#289

@aimerib
Copy link
Contributor

aimerib commented Sep 26, 2024

@FurkanGozukara you're welcome! I chose to go the path mcmonkey suggested, using the params to control sorting instead of the prompt syntax. The yolo prompt syntax is already pretty heavy, and keeping it from getting more complex would be nice. The params accomplish the same thing, I think. Of note, if you use sorting, it will only return the first match after the sort. There's some room here for it to not do that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C# This pertains to the C# engine Feature New feature or request Python This pertains to the python code (Comfy)
Projects
None yet
Development

No branches or pull requests

4 participants