Gourieff / sd-webui-reactor

Fast and Simple Face Swap Extension for StableDiffusion WebUI (A1111 SD WebUI, SD WebUI Forge, SD.Next, Cagliostro)
GNU Affero General Public License v3.0
2.47k stars 264 forks source link

Gender detection fails on images with multiple gendered faces. #530

Open TheCrake opened 2 days ago

TheCrake commented 2 days ago

First, confirm

What happened?

If you choose a gender under gender detection on an image with multiple genders, no face swap occurs.

Steps to reproduce the problem

If you have an image with one male face and one female face, setting it to only target female faces results in it ignoring the image if it detects any male faces, and vice versa. One would expect it to ignore only the faces that fail, and still work on the faces that are the correct gender.

Sysinfo

forge, current version of reactor

Relevant console log

[Unload] Current free memory is 4829.20 MB ...
10:14:53 - ReActor - STATUS - Working: source face index [0, 1], target face index [0, 1]
10:14:53 - ReActor - STATUS - Using Loaded Source Face Model: face.safetensors
10:14:53 - ReActor - STATUS - Analyzing Target Image...
10:14:54 - ReActor - STATUS - Detecting Source Face, Index = 0
10:14:54 - ReActor - STATUS - Detected: -50- y.o. Female
10:14:54 - ReActor - STATUS - Detecting Target Face, Index = 0
10:14:54 - ReActor - STATUS - Target Face 0: Detected Gender -M-
10:14:54 - ReActor - STATUS - WRONG - Detected Gender doesn't match Condition
10:14:54 - ReActor - STATUS - Detected: -27- y.o. Male
Total progress: 100%|██████████████████████████████████████████████████████████████████| 30/30 [00:13<00:00,  2.24it/s]

Additional information

No response

mykeehu commented 1 day ago

I have the same problem. If no limit is set, only gender, it applies to all (or specified by ID) women in the picture and ignores men.