Fooocus icon indicating copy to clipboard operation
Fooocus copied to clipboard

[Feature Request]: Character consistency

Open IamTirion opened this issue 11 months ago • 8 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What would your feature do?

It would generate images of a character with the same face and clothes in any environments.

Take a look at this: https://www.youtube.com/watch?v=7BO_TocisAc

This is an experimental feature in Midjourney v6, but it's already working very well. Note how different this is to the current Face Swap feature. Face Swap keeps the face angle in the generated image the same as the input image, and it doesn't keep the clothes in the generated image. The Character Consistency feature in Midjourney attempts to generate the face at a different angle, and keeps the clothes the same.

Proposed workflow

  1. Go to Image Prompt
  2. Press Advanced, Character Consistency (new feature)
  3. Add a character image

Additional information

No response

IamTirion avatar Mar 12 '24 12:03 IamTirion

@IamTirion i saw that already this morning, nice new feature in MJ. Fooocus can already do almost the same, it wasn't difficult to change the angle of a person in a photo using FaceSwap (no effort was put into the prompt whatsoever, just doing this for the angle). I'm not certain in what you'd propose would differ from the already existing implementation, maybe you can provide more feedback.

Examples (all with different models)

1/1 screencapture-127-0-0-1-7865-2024-03-12-23_50_58

3/4 screencapture-127-0-0-1-7865-2024-03-12-23_56_30

3/4 screencapture-127-0-0-1-7865-2024-03-12-23_57_56

mashb1t avatar Mar 12 '24 23:03 mashb1t

One thing i found using the face swap networks on other UIs, is that starting them later allows them to match faces to new angles and positions.

image image

ScionoicS avatar Mar 13 '24 00:03 ScionoicS

@IamTirion i saw that already this morning, nice new feature in MJ. Fooocus can already do almost the same, it wasn't difficult to change the angle of a person in a photo using FaceSwap (no effort was put into the prompt whatsoever, just doing this for the angle). I'm not certain in what you'd propose would differ from the already existing implementation, maybe you can provide more feedback. Examples (all with different models)

  1. Clothes consistency
  2. Hair consistency
  3. Face angle. Let me explain the difference I see between Face Swap and Midjourney's Character Consistency. I see in Midjourney's version, the character can look in many directions, and it can generate a side view of the face even if the input image has a frontal view of the face. In my experience, and I think in your examples too, Face Swap will make the character nearly always look in the same direction as the input image, so I can't generate an image that is looking at the character from a different camera angle. There can be slight changes to the face angle when using Face Swap, but not as much as the Midjourney one. image You can see the girl looking down at the camera, looking away from the camera, while she is looking straight at the camera in the input image.

ScionoicS suggested by starting Face Swap later, we can get bigger changes to the face angle, but that sacrifices the likeliness of the generated face to the input face. In my experience, it also doesn't work that well. There was once I first generated an image, then inpainted it with Face Swap. In the end, it still gave me the same face angle as the input image.

IamTirion avatar Mar 13 '24 00:03 IamTirion

I can't wait for the additions to be made

dmitrysinev avatar Mar 13 '24 08:03 dmitrysinev

Is something possible to do with inswapper_128, I heard that MJ is also using a non-open-source high-resolution inswapper_ version by Insightface, I have used inswapper_128 it's in (roop-unleashed) and the result is amazing but resolution is low

sumit-coder avatar Mar 14 '24 08:03 sumit-coder

One thing i found using the face swap networks on other UIs, is that starting them later allows them to match faces to new angles and positions.

image image

Maybe Ive overlooked something but surely thats just because they use controlnet too? Instant ID is basically IP adapter insightface and controlnets. An idea maybe to use insightface twice, once with IP adapter then once at the end alone when the image has been generated. Its a quick process so wouldnt add much time onto each generation.

G-force78 avatar May 18 '24 08:05 G-force78

One thing i found using the face swap networks on other UIs, is that starting them later allows them to match faces to new angles and positions. image image

Maybe Ive overlooked something but surely thats just because they use controlnet too? Instant ID is basically IP adapter insightface and controlnets. An idea maybe to use insightface twice, once with IP adapter then once at the end alone when the image has been generated. Its a quick process so wouldnt add much time onto each generation.

I don't know, but maybe it's not worth replicating their results anymore. There are new researches on character consistency every day. Everything we have feels like a workaround, rather than a real solution.

IamTirion avatar May 19 '24 08:05 IamTirion

I can't wait for this amazing MJ feature to be added in Fooocus!

muneeb227 avatar Jul 20 '24 17:07 muneeb227