upscale and faceswap not working
i am trying this :- input={ "api_name":"upscale-vary", "prompt":f"{request_data.prompt}, beautiful eyes, perfect eyes, perfect fingers", "negative_prompt":f"{request_data.negative}", "performance_selection":"Speed", "cn_img1":f"{image_url}", "cn_weight1":"1", "cn_stop1":"1", "cn_type1":"FaceSwap", "input_image":f"{image_url}", "uov_method": "Upscale (1.5x)", "advanced_params": "{'mixing_image_prompt_and_vary_upscale':'true'}", "require_base64": "true" } what should i do to use the faceswap with the upscale ?
I see. You mean that it runs and does not return any error but the faceswap is not there, right? This might be due to how it needs to convert images to multipart/form-data on V1 endpoints. Try using V2 where you can as they're less prone to errors caused by this. I'll take a look at this combination on V1s later.
This one works:
{
"input":{
"api_name":"upscale-vary2",
"prompt":"prompt",
"input_image":"url-or-base64",
"image_prompts": [
{
"cn_img":"url-or-base64",
"cn_stop":1,
"cn_weight":1,
"cn_type":"FaceSwap"
}
],
"uov_method": "Upscale (1.5x)",
"require_base64": true,
"advanced_params": {"mixing_image_prompt_and_vary_upscale":true}
}
}
Update: I checked the code outputs and it's passing all images correctly. But as I went through the Fooocus-API source code, it seems like this V1 endpoint is simply not checking the cn_imgX param at all. I created an issue there to discuss if it's intentional or not. For now, I am marking this as something that is discussed in the Fooocus-API repo, and I'll do another update once I know more. Until then try to use V2.
let me know i f there is an update
Closing this issue as Stale. It's marked as a planned enhancement in the Fooocus-API repo where it also has to be dealt with. I suggest tracking the progress there. Thanks for the feedback!