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

feat: support HAT #607

Merged
merged 2 commits into from
Dec 14, 2024
Merged

feat: support HAT #607

merged 2 commits into from
Dec 14, 2024

Conversation

routineLife1
Copy link
Contributor

@routineLife1 routineLife1 commented Dec 14, 2024

  • feat: Contributed DAT and HAT implementation for Final2x.
  • chore: update releases download link

Summary by Sourcery

Introduce support for HAT models in the ModelOptions and update the Final2x-core release download links to the latest version.

New Features:

  • Add support for HAT models in the ModelOptions configuration.

Chores:

  • Update the download links for the Final2x-core releases to the latest version.

feat: Contributed DAT and HAT implementation for Final2x.
chore: update releases download link
Copy link

sourcery-ai bot commented Dec 14, 2024

Reviewer's Guide by Sourcery

This PR adds support for HAT (Hybrid Attention Transformer) models and updates the core download links. The implementation involves adding new model options to the existing list and updating the download URLs for different platforms.

Class diagram for updated ModelOptions

classDiagram
    class ModelOptions {
        +String label
        +String value
    }
    ModelOptions : +DAT_S_2x
    ModelOptions : +DAT_S_3x
    ModelOptions : +DAT_S_4x
    ModelOptions : +DAT_2x
    ModelOptions : +DAT_3x
    ModelOptions : +DAT_4x
    ModelOptions : +DAT_2_2x
    ModelOptions : +DAT_2_3x
    ModelOptions : +DAT_2_4x
    ModelOptions : +DAT_light_2x
    ModelOptions : +DAT_light_3x
    ModelOptions : +DAT_light_4x
    ModelOptions : +DAT_APISR_GAN_generator_4x
    ModelOptions : +HAT_S_2x
    ModelOptions : +HAT_S_3x
    ModelOptions : +HAT_S_4x
    ModelOptions : +HAT_2x
    ModelOptions : +HAT_3x
    ModelOptions : +HAT_4x
    ModelOptions : +HAT_Real_GAN_sharper_4x
    ModelOptions : +HAT_Real_GAN_4x
    ModelOptions : +HAT_ImageNet_pretrain_2x
    ModelOptions : +HAT_ImageNet_pretrain_3x
    ModelOptions : +HAT_ImageNet_pretrain_4x
    ModelOptions : +HAT_L_ImageNet_pretrain_2x
    ModelOptions : +HAT_L_ImageNet_pretrain_3x
    ModelOptions : +HAT_L_ImageNet_pretrain_4x
    ModelOptions : -SRCNN_2x
    ModelOptions : -SRCNN_3x
    ModelOptions : -SRCNN_4x
Loading

File-Level Changes

Change Details Files
Added HAT model options to the available model selection list
  • Added HAT_S variants for 2x, 3x, and 4x scaling
  • Added standard HAT variants for 2x, 3x, and 4x scaling
  • Added HAT Real GAN variants (sharper and standard) for 4x scaling
  • Added HAT ImageNet pretrained variants for 2x, 3x, and 4x scaling
  • Added HAT L ImageNet pretrained variants for 2x, 3x, and 4x scaling
src/renderer/src/utils/ModelOptions.ts
Updated core download links to the latest version
  • Updated download URLs from 2024-11-09 to 2024-12-14 release
  • Updated links for macos-arm64, macos-x64, and windows-x64 platforms
resources/download-core.js
Reorganized model options list
  • Moved DAT model options to a different position in the list
  • Added SRCNN model options for 2x, 3x, and 4x scaling
src/renderer/src/utils/ModelOptions.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @routineLife1 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 10 to 17
const coreDict = {
'macos-arm64':
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-11-09/Final2x-core-macos-arm64.7z',
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-12-14/Final2x-core-macos-arm64.7z',
'macos-x64':
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-11-09/Final2x-core-macos-x64.7z',
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-12-14/Final2x-core-macos-x64.7z',
'windows-x64':
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-11-09/Final2x-core-windows-latest.7z'
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-12-14/Final2x-core-windows-latest.7z'
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider extracting the release date into a shared version variable

Using a shared version variable would make updates easier and reduce the risk of inconsistencies when new versions are released.

Suggested change
const coreDict = {
'macos-arm64':
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-11-09/Final2x-core-macos-arm64.7z',
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-12-14/Final2x-core-macos-arm64.7z',
'macos-x64':
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-11-09/Final2x-core-macos-x64.7z',
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-12-14/Final2x-core-macos-x64.7z',
'windows-x64':
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-11-09/Final2x-core-windows-latest.7z'
'https://github.com/Tohrusky/Final2x-core/releases/download/2024-12-14/Final2x-core-windows-latest.7z'
}
const CORE_RELEASE_VERSION = '2024-12-14'
const coreDict = {
'macos-arm64':
`https://github.com/Tohrusky/Final2x-core/releases/download/${CORE_RELEASE_VERSION}/Final2x-core-macos-arm64.7z`,
'macos-x64':
`https://github.com/Tohrusky/Final2x-core/releases/download/${CORE_RELEASE_VERSION}/Final2x-core-macos-x64.7z`,
'windows-x64':
`https://github.com/Tohrusky/Final2x-core/releases/download/${CORE_RELEASE_VERSION}/Final2x-core-windows-latest.7z`
}

@Tohrusky Tohrusky merged commit 70b9f00 into Tohrusky:main Dec 14, 2024
8 checks passed
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