sdwebuiapi icon indicating copy to clipboard operation
sdwebuiapi copied to clipboard

[Request] Script access API with extra_single_image?

Open GanerCodes opened this issue 2 years ago • 2 comments

I'm trying to add a remove background step to my workflow, however I can't seem to find anyway to interface with that extension. Theoretically it would look like this:

result = api.extra_single_image(
    image=Image.open("img2.png"),
    script_name="stable-diffusion-webui-rembg",
    script_args=["u2net", False, False, 240, 10, 10])

GanerCodes avatar May 22 '23 13:05 GanerCodes

There is no api parameters for scripts in extra_single_image api call. Since rembg extension is from AUTOMATIC1111, maybe he will introduce some API?

mix1009 avatar May 23 '23 00:05 mix1009

There is no api parameters for scripts in extra_single_image api call.

You could reverse-engineer the client but that would be very tedious and prone to breaking unfortunately; I had to hack together an API for regular rembg lol. Thanks for the response however!

GanerCodes avatar May 23 '23 00:05 GanerCodes