glucauze / sd-webui-faceswaplab

Extended faceswap extension for StableDiffusion web-ui with multiple faceswaps, inpainting, checkpoints, ....
https://glucauze.github.io/sd-webui-faceswaplab/
GNU Affero General Public License v3.0
715 stars 92 forks source link

Face Swap does not trigger consistently (solved : NSFW filtering too strong -> increase nsfw threshold) #80

Closed tokenwizard closed 11 months ago

tokenwizard commented 11 months ago

Please remember that the bug report section is not a forum. Before submitting a bug, ensure you have read the FAQ thoroughly. This helps us maintain an efficient bug tracking process. Thank you for your understanding and cooperation. Use the discussion section for anything else.

Describe the bug I will be generating image after image with successful face swap using this plugin. But then suddenly the next image does not get the face swapped. After generating a few more images or switching the face model, it will work again for a while but eventually stops working again.

To Reproduce Steps to reproduce the behavior:

  1. Train a Face Checkpoint using the FaceSwapLab tab, Batch Source Images and name it whatever you like
  2. Use Txt2Img or Img2Img to generate a new image with your trained face checkpoint listed in the FaceSwapLab section and Enabled
  3. Repeat Generation without changing any settings or prompt
  4. Eventually the generated images will not get the face swapped

Expected behavior The Face Checkpoint should continue to be applied as long as it is set and enabled.

Screenshots Here you can see console output where Inswapper was triggered for the first image generation, but then the second one did not trigger Inswapper, so the face did not get swapped: image

Here is the First Image with has my face 00012-1806140301-swapped

And the second which doesn't. 00013-357905843-swapped

Desktop (please complete the following information): image

Firefox 116.0.3

glucauze commented 11 months ago

Ok that's weird. Are you experimenting the bug when you are selecting an image with the same seed again ? I don't have that problem ?

tokenwizard commented 11 months ago

I did not touch any settings between generating those two photos. The Seed was left at the default value in Automatic1111 webui of "-1" and other than setting the Face Checkpoint and checking the Enable checkbox before generating the first picture, I did not change anything in the FaceSwapLab section: image

Literally I set all the settings and clicked Generate twice; the first one applied the face swap and the second one didn't.

But it seems random as to how many will work before it starts failing to swap the face.

glucauze commented 11 months ago

Yep that's why it could be interesting to fix the seed to see if it appears randomly or for some specific seeds. If it works half the time for a given seed, that would mean there is a bug. If not, it can be related to the nsfw setting in sd. Try setting to 1 to disable filtering and see if it does solve the problem.

tokenwizard commented 11 months ago

Yep that's why it could be interesting to fix the seed to see if it appears randomly or for some specific seeds. If it works half the time for a given seed, that would mean there is a bug. If not, it can be related to the nsfw setting in sd. Try setting to 1 to disable filtering and see if it does solve the problem.

Are you referring to this NSFW setting? image

glucauze commented 11 months ago

Yes

tokenwizard commented 11 months ago

Ok, I slid that all the way to 1 and it seems to be working reliably now. No idea why it was okay with that first image above but flagged the second one as NSFW when I didn't change the prompt.

Thanks for the suggestion! I would have never thought that would be the issue.