Skip to content

[Bug]: SwinIR v2 support regressed? #16350

@SplittyDev

Description

@SplittyDev

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

SwinIR v2 support was added and merged here: #2092

I noticed that this doesn't actually work today (the PR was merged 2 years ago). The SwinIR v2 models show up in the UI, but they crash the UI. There's also a message:

Swin2SR_RealworldSR_X4_64_BSRGAN_PSNR.v2.pth' is not a 'SwinIR' model (got 'Swin2SR')

I couldn't even find the module for SwinIR anymore, and it looks like it has been rewritten at some point to be a builtin extension.

In the SwinIR extension, I can't see any separate handling of Swin2SR anymore, and no handling for the .v2.pth extension added in the aforementioned PR.

Was the Swin2SR support removed on purpose, or did it happen by accident during the architectural change from a module to a builtin extension?

Steps to reproduce the problem

  1. Download Swin2SR (Swin2SR_RealworldSR_X4_64_BSRGAN_PSNR.pth) from https://github.com/mv-lab/swin2sr/releases/tag/v0.0.1
  2. Rename it to have the .v2.pth file extension as mentioned in Implement SwinIR v2 #2092
  3. Restart the webUI
  4. Select upscaler Swin2SR_RealworldSR_X4_64_BSRGAN_PSNR.v2
  5. Observe the crash when trying to generate an image with upscaling enabled

What should have happened?

I would've expected the Swin2 architecture to be supported, as support for it has already been merged two years ago.

What browsers do you use to access the UI ?

Apple Safari

Sysinfo

sysinfo-2024-08-08-12-53.json

Console logs

Relevant part:


WARNING:modules.modelloader:Model '/Users/splitty/Developer/stable-diffusion-webui/models/SwinIR/Swin2SR_RealworldSR_X4_64_BSRGAN_PSNR.v2.pth' is not a 'SwinIR' model (got 'Swin2SR')
SwinIR:   0%|                                                                                       | 0/9 [00:00<?, ?it/s]Assertion failed: (0 <= mpsAxis && mpsAxis < 4 && "Runtime canonicalization must simplify reduction axes to minor 4 dimensions."), function getKernelAxes, file GPUReductionOps.mm, line 31.
./webui.sh: line 304: 97131 Abort trap: 6           "${python_cmd}" -u "${LAUNCH_SCRIPT}" "$@"
/Users/splitty/miniconda3/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '


### Additional information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions