Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwinIR_4x upscaling not working because of incorrect naming #14

Open
trojblue opened this issue Feb 21, 2023 · 2 comments
Open

SwinIR_4x upscaling not working because of incorrect naming #14

trojblue opened this issue Feb 21, 2023 · 2 comments

Comments

@trojblue
Copy link

in webuiapi.py:

class Upscaler(str, Enum):
    none = 'None'
    Lanczos = 'Lanczos'
    Nearest = 'Nearest'
    LDSR = 'LDSR'
    BSRGAN = 'BSRGAN'
    ESRGAN_4x = 'ESRGAN_4x'
    R_ESRGAN_General_4xV3 = 'R-ESRGAN General 4xV3'
    ScuNET_GAN = 'ScuNET GAN'
    ScuNET_PSNR = 'ScuNET PSNR'
    SwinIR_4x = 'SwinIR 4x'

It should be SwinIR_4x instead of spaces.

@mix1009
Copy link
Owner

mix1009 commented Feb 21, 2023

Which API did you use?

스크린샷 2023-02-21 오후 8 19 47

If I pass 'SwinIR_4x' to extra_single_image it returns 500 error.

@trojblue
Copy link
Author

Which API did you use?

스크린샷 2023-02-21 오후 8 19 47

If I pass 'SwinIR_4x' to extra_single_image it returns 500 error.

I'm using extra_batch_images. using the default values of webuiapi.Upscaler.SwinIR_4x gives "could not find upscaler named SwinIR 4x".

    api = webuiapi.WebUIApi()
    upscale_results = api.extra_batch_images(images=img_files,
                                             upscaler_1=webuiapi.Upscaler.SwinIR_4x,
                                             upscaler_2=webuiapi.Upscaler.SwinIR_4x,
                                             extras_upscaler_2_visibility=0.65,
                                             gfpgan_visibility=0.15,
                                             upscaling_resize=2)

console:

...
  File "D:\APP\0Drivers\Python310\lib\site-packages\webuiapi\webuiapi.py", line 372, in extra_batch_images
    return self._to_api_result(response)
  File "D:\APP\0Drivers\Python310\lib\site-packages\webuiapi\webuiapi.py", line 80, in _to_api_result
    raise RuntimeError(response.status_code, response.text)
RuntimeError: (500, 'Internal Server Error')

webui:

  File "O:\webui2\modules\postprocessing.py", line 103, in run_extras
    return run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir, show_extras_results, *args, save_output=save_output)
  File "O:\webui2\modules\postprocessing.py", line 56, in run_postprocessing
    scripts.scripts_postproc.run(pp, args)
  File "O:\webui2\modules\scripts_postprocessing.py", line 130, in run
    script.process(pp, **process_args)
  File "O:\webui2\scripts\postprocessing_upscale.py", line 83, in process
    assert upscaler1 or (upscaler_1_name is None), f'could not find upscaler named {upscaler_1_name}'
AssertionError: could not find upscaler named SwinIR 4x

I'm not sure if the name has changed, but I'm using Feb5 commit of webui. commit idea9bd9fc7409109adcd61b897abc2c8881161256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants