mrhan1993 / Fooocus-API

FastAPI powered API for Fooocus
GNU General Public License v3.0
508 stars 135 forks source link

Hello FaceSwap API for face replacement #250

Open egoorr opened 3 months ago

egoorr commented 3 months ago

Hello FaceSwap API for face replacement

mrhan1993 commented 3 months ago

This is a function in image prompt, use image prompt endpoint and change cn_type in params, like this :

face_swap_params = {
    "performance_selection": "Speed",
    "aspect_ratios_selection": "896*1152",
    "image_prompts": [
        {
            "cn_img": source_face_m,
            "cn_stop": 0.5,
            "cn_weight": 0.6,
            "cn_type": "ImagePrompt"
        },{
            "cn_img": target_face,
            "cn_stop": 0.9,
            "cn_weight": 0.75,
            "cn_type": "FaceSwap"
        }
    ],
    "async_process": False
}
platform-kit commented 2 months ago

@mrhan1993 Is this project using IP Adapter or Instant ID under the hood?

If it's not Instant ID, is there any chance we could get that supported?

mrhan1993 commented 2 months ago

@mrhan1993 Is this project using IP Adapter or Instant ID under the hood?

If it's not Instant ID, is there any chance we could get that supported?

this need Fooocus to support

platform-kit commented 2 months ago

@mrhan1993 There's a fork which has already implemented it: https://github.com/lllyasviel/Fooocus/issues/2025#issuecomment-1947322264