[Bug]: API "/sdapi/v1/upscalers" does not work as expected and does not return correct upscaler model info
Straafe opened this issue · 1 comments
Is there an existing issue for this?
- I have searched the existing issues and checked the recent builds/commits
What happened?
"/sdapi/v1/upscalers"
Does not return the models I have places in the SwinIR and ESRGAN models folders as expected. It seems to return a generic "ESRGAN 4x" for every ESRGAN model in the models directory, rather than info or the path to the actual custom ESRGAN model.
Steps to reproduce the problem
Add some extra models to the ESRGAN folder and then run this API command.
What should have happened?
All your models should appear in the API response, but they do not and seems like all ESRGAN models are replaced with the same response.
I get a response like this:
[
{
"name": "None",
"model_name": null,
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\None",
"model_url": null
},
{
"name": "Lanczos",
"model_name": null,
"model_path": null,
"model_url": null
},
{
"name": "Nearest",
"model_name": null,
"model_path": null,
"model_url": null
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "ESRGAN",
"model_name": "ESRGAN_4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ESRGAN",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
},
{
"name": "RealESRGAN",
"model_name": null,
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\RealESRGAN",
"model_url": null
},
{
"name": "RealESRGAN",
"model_name": null,
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\RealESRGAN",
"model_url": null
},
{
"name": "LDSR",
"model_name": null,
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\LDSR",
"model_url": "https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1"
},
{
"name": "ScuNET",
"model_name": "ScuNET GAN",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ScuNET",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_gan.pth"
},
{
"name": "ScuNET",
"model_name": "ScuNET GAN",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\ScuNET",
"model_url": "https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_gan.pth"
},
{
"name": "SwinIR",
"model_name": "SwinIR 4x",
"model_path": "[yourpathhere]\\stable-diffusion-webui\\models\\SwinIR",
"model_url": "https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR-L_x4_GAN.pth "
}
]
Here you can see the actual upscaler models I have in the ESRGAN folder:
Commit where the problem happens
What platforms do you use to access UI ?
Windows
What browsers do you use to access the UI ?
Mozilla Firefox
Command Line Arguments
No response
Additional information, context and logs
No response
Since this, now many of the old api commands no longer appear in the documentation in the latest version of webui, including this one. I can't find much info on it. If compare the api docs from the commit earlier this week to the one right now, you can see most of the main api calls were removed? (Image below shows documentation from commit a few days ago and today's)