mix1009 / sdwebuiapi

Python API client for AUTOMATIC1111/stable-diffusion-webui
MIT License
1.39k stars 187 forks source link

[Request] Script access API with extra_single_image? #76

Open GanerCodes opened 1 year ago

GanerCodes commented 1 year ago

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])
mix1009 commented 1 year ago

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?

GanerCodes commented 1 year ago

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!