sdwebuiapi icon indicating copy to clipboard operation
sdwebuiapi copied to clipboard

Could not use Upscaler.ESRGAN_4x.R_ESRGAN_General_4xV3

Open avatarstones opened this issue 2 years ago • 1 comments

Thanks for the great open source!

When I use

result2 = api.extra_single_image(image=result1.images[0],
                                         upscaler_1=webuiapi.Upscaler.ESRGAN_4x,
                                         upscaling_resize=2.0
        )

everything was working, but if change to another upsclaler

result2 = api.extra_single_image(image=result1.images[0],
                                         upscaler_1=webuiapi.Upscaler.ESRGAN_4x.R_ESRGAN_General_4xV3,
                                         upscaling_resize=2.0
        )

got error

RuntimeError: (500, '{"error":"AssertionError","detail":"","body":"","errors":"could not find upscaler named R-ESRGAN General 4xV3"}')

Can anyone help? Thanks.

avatarstones avatar May 20 '23 10:05 avatarstones

You can pass string instead. try passing "name" values returned from api.get_upscalers()

upscaler parameters is somewhat inconsistent between api endpoints and webui versions.

mix1009 avatar May 21 '23 05:05 mix1009