stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Feature Request]: Add upscalers to /sdapi/

Open kylewetton opened this issue 2 years ago • 2 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 ?

Not sure if this is in the backlog, but currently solely relying on the /sdapi/ endpoints for my project. I see there is an endpoint to get a list of upscalers and their paths/URLs. It'd be helpful to be able to add an upscaler to the /txt2img endpoint or have a dedicated POST endpoint to be able to use these upscalers.

Proposed workflow

A new property for /sdapi/v1/txt2img

{
...
upscaler: "SwinIR"
}

OR POST /sdapi/v1/upscale

{
image: ...,
name: "SwinIR"
}

Additional information

No response

kylewetton avatar Nov 14 '22 00:11 kylewetton

Ah I see it is under extra-single-image. Perhaps that's not the best naming convention, as it follows the web UI for naming...?

kylewetton avatar Nov 14 '22 00:11 kylewetton

Perhaps that's not the best naming convention, as it follows the web UI for naming...?

It's not the most intuitive for anyone just working with the API; that said, as it's API for the Web UI then naming the endpoints in according to the Web UI format seems logical. It'd be troublesome to change the name now and break every frontend out there that's using this API endpoint.

Kilvoctu avatar Nov 14 '22 00:11 Kilvoctu

@ClashSAN might want to close this as the extras API exists now

aliencaocao avatar Dec 24 '22 07:12 aliencaocao