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

[Bug]: SwinIR v2 support regressed? #16350

Open
3 of 6 tasks
SplittyDev opened this issue Aug 8, 2024 · 0 comments
Open
3 of 6 tasks

[Bug]: SwinIR v2 support regressed? #16350

SplittyDev opened this issue Aug 8, 2024 · 0 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@SplittyDev
Copy link

SplittyDev commented Aug 8, 2024

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_
@SplittyDev SplittyDev added the bug-report Report of a bug, yet to be confirmed label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant