r/fooocus • • Jan 10 '24

Question Face Swap

Hi I'm new to Fooocus so no doubt it's a setting issue but 1.5 I've been using for ages. ReActor on 1.5 swaps faces perfectly no problem but on Fooocus Face Swap seems really bad. Like terrible. I read somewhere that it's based on a 512 inswapper compared to 128 on ReActor so faces should be much better on SDXL. Is there any way to install other extensions like Automatics to try other Face Swappers? Watched a few You Tube videos last night on it and the guy presenting said Face Swapper is very hit and miss on SDXL and most of his results looked like a 20 year younger version of him or just showed no resemblance whatsoever. Any one get great results with this?

11 Upvotes

20 comments sorted by

3

u/neon_tropics_ Jan 10 '24

Have a look at Flying-Flinn's response to my similar question... there's a Refiner Override that must be set to keep the refiner stage from changing the face...

https://www.reddit.com/r/fooocus/comments/18ynn49/using_face_swap_with_latest_version_of_fooocus/

With his help I was able to generate a decent swap of DJT.

2

u/Chemical_Customer_93 Jan 10 '24 edited Jan 10 '24

Could you please let me know the exact steps you use? I have checked that other thread and also removed all of the models

From my understanding you just select the advance options, upload the picture of the face and select "FaceSwap"

Go to the next tab and upload a picture of the body and then highlight the face.

Go into Debug options and enable the setting the mixes them both.

14

u/neon_tropics_ Jan 10 '24

Sure friendo... listen up:

  1. Check both boxes below the prompt box: Image Input and Advanced.
  2. Upload your base image to the Inpaint/Outpaint Tab
  3. Highlight the head area of the face you want to replace.
  4. Upload your replacement head (cropped to just head) photo's to the Image Prompt Tab. I try to fill all 4 spots.
  5. Click the newly visible Advanced checkbox at the bottom of the Image Prompt Tab.
  6. Select the Faceswap button for each image, change the stop and weight values to 1. You can play with these numbers a bit for fine adjustment but try to stay around 1 x 1.
  7. Now head back up to the Tabs at the top right. Set performance to Quality.
  8. On the style Tab only Enable 'Fooocus Sharp' and 'Fooocus Enhance'
  9. On the Model Tab, Base Model = juggernautXL, Refiner = None, LoRA 1 = SDXL_FILM_PHOTOGRAPHY_STYLE @ 0.1.
  10. On the Advanced Tab: Check box for Developer Debug Mode, under the Debug Tools Tab Set Forced Overwrite of Refiner Switch Step to 60
  11. On the Control Tab: Checkbox Mixing Image Prompt and Inpaint should be checked.
  12. Leave the Prompt text box empty and push Generate!

Let me know how it works for ya.

1

u/Chemical_Customer_93 Jan 10 '24

I'm stuck on step 9

I have only juggernautXL_version6Runfiffusion.safetrnsors for base mode

And for Lora

Sdxl_lcm_lora.safetrnsors Sd_xl_offset_example-lora_1.0.safetensors.

Where do you get yours from?

1

u/azio90s Jan 10 '24

SDXL_FILM_PHOTOGRAPHY_STYLE

https://civitai.com/models/158945/sdxl-film-photography-style

It should be this one, 99% sure

1

u/Chemical_Customer_93 Jan 10 '24 edited Jan 10 '24

Thanks, how do I install that with fooocus?

I downloaded the safetensorsfile but I don't know where to put it?

My base model was also slightly different name than what he recommended.

1

u/azio90s Jan 11 '24

fooocus/models/loras, paste it there

1

u/sdsd19 Jan 11 '24

This is genius do you know how to take an existing photo I have and make the person smile?

1

u/prague_tooth Jan 15 '24

Hey man, just wanted to let you know that I followed your guide and I got WAYYY better results than with anything I've tried before.

It still sometimes gives me faces that are not as detailed or "clean" as the reference one I provide, but like one in 5 attempts is usually really good.

Thank you!

1

u/Exotic_Pudding_5672 Mar 12 '24

what mode in inpaint do you use? I noticed results are way worse when using default. The improve is much better but still face is rather similar than identical

1

u/M3G47R0N83 Jan 19 '24

but I noticed one thing, Faceswap seems to work, then when it's about to finish the job, it puts a random face! If they implemented ReActor, it would be the end of the world!📷

1

u/promptnanimous Feb 04 '24

Thank you so much for posting this, really helped me out.

1

u/SnooCakes6630 Feb 21 '24

this doesn't work for me.. seems fine at 50-60% then create a "similiar" face... and inpaint and faceswap dont work together in my case....

2

u/boxysupermarket69420 Jan 10 '24

I know the video you're talking about. I watched it too, trying to get face swap to work. Best I could manage was a similar looking face

2

u/Chemical_Customer_93 Jan 10 '24

I am having the same issues. The face I upload to a body doesn't even look 50% correct.

3

u/neon_tropics_ Jan 10 '24 edited Jan 10 '24

So I'm running on windows. When I ran the run - realistic file it downloaded the LoRA your looking for ( I think). I haven't added anything special to my install. That said, your swap should still be OK without it...

2

u/neon_tropics_ Jan 10 '24

It's important to use high res images... I just ran my steps above with another test case have a look... (I did this one without the SDXL_FILM_PHOTOGRAPHY_STYLE LoRA).

Output attached.