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

Simplified PLKSR #255

Merged
merged 2 commits into from
May 11, 2024
Merged

Simplified PLKSR #255

merged 2 commits into from
May 11, 2024

Conversation

RunDevelopment
Copy link
Member

I wanted to make review comments, but there was a lot of small things, so I just quickly did them myself.

In general, I made the code less defensive. You almost always checked whether a key was present in the state dict before accessing it. This is entirely unnecessary, because we assume that the state dicts load gets are valid. So they aren't missing any important keys. If they were missing any such keys, then they'd be invalid and we'd be allowed to just fail.
Using this assumption, I simplified some code.

Other changes:

  • Fixed a bug where the tag for n_blocks as create before the real value was assigned.
  • Removed size requirement, because it allowed all image sizes.

@joeyballentine joeyballentine merged commit 7f34701 into PLKSR May 11, 2024
8 checks passed
@joeyballentine joeyballentine deleted the plksr-simp branch May 11, 2024 23:29
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

Successfully merging this pull request may close these issues.

2 participants