-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Use Waifu2X to enlarge background image #412
Conversation
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Just chiming in to give my own 2 cents, but Waifu2X can be resource intensive depending on the image resolution, so I would not recommend using machines that do not have the following specifications:
I think that covers it? |
As long as its toggleable between the current implementation (MagicScaler) and w2x I'm fine with it. Especially due to the nature of w2x As for minimum specs, since the binary used is ncnn it just need Vulkan support, and if you can run hpyo games without any intervention it should be all ok. Tho a proper check if vulkan is available when toggling it on (like invoking vulkaninfo and just looking for the ERRORLEVEL shall do IMO). Also do note that some AMD iGPU users like me suffers a driver degradation where any ncnn scaler will give a blank 0b output without the ncnn giving out error itself, so you might want to check if the output is a valid image and do a proper fallback when it doesn't |
In fact, Collapse can only run on systems above Windows 10, so in most cases there is no need to consider system version compatibility issues. For supported GPUs, I think this is already checked in native. For example, the Vulkan Loader (vulkan-1.dll) fails to load, or the Vulkan api returns an error code. This toggle is disabled when native library fails to load. Also I will add some extra checks for black or corrupted image. |
We will not get pixelated image using MagicScaler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested done internally and works great for both CPU only (might be REALLY slow) and GPU mode :fuhuayatta:
Some inputs ahead~
{ | ||
try | ||
{ | ||
_context = waifu2x_create(gpuId, ttaMode, numThreads); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per discussion internally, please add debug/info log around when w2x is invoked as it can take a bit of time, so the user that seeing the console can understand that its actually doing it instead of the image failed to load.
discrete > integrated > others
Can I get the source for the OpenMP? I need the license file to be added manually as its not from NuGet |
https://github.com/llvm/llvm-project/blob/main/openmp/LICENSE.TXT libomp binary file is copied from vcredist |
* [skip ci] Update README.md * Clamp column width if there is no space left This to fix the DataTable component causing a crash due to negative value if small window mode is used. * Enable Rich Presence only after the activated region is set might fix #402 * Fix blurry console icon Also, get the icon from exe rather than a separate ico file * (CodeQA) Theme xaml * Move RPC dispose Adjusted to be in the same file where it is initialized (448ff77) * Change default value displayed for ```Download Threads``` to match the real default value * Auto resize DataTable column width using star L.CRC and R.CRC are hidden in small window mode before this commit. * [skip ci] Update LICENSE and its references * [skip ci] Update SECURITY.md - Added @shatyuka and @gablm to the active maintainers list - Update supported version section * [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. * HI3 Senadina Game Settings Adjustments (#417) * (GSP) HI3: Adjust to new version * [skip ci] Add more abbreviation list * Use ShouldComputeInputPris on build To try mitigate resource not found error * (GSP) More Hi3 Senadina backend changes * (GSP) Force GraphicsGrade to 6 on Save * (GSP) Docs * (GSP) Senadina frontends and localization * (GSP) Disable preset * CodeQA stuff * Fix crash due to value not exist for ``GraphicsReflectionQuality`` * Move and change Physics toggle to ``ToggleSwitch`` * review adjustments * Review adjustment - Use comparedTo instead of TypeExtensions for Equals() in PhysicsSimulation.cs - Adjustment on comparedTo in GraphicsGrade.cs - Remove unnecessary int declaration in Honkai\RegistryClass\Enums.cs --------- Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com> Co-authored-by: Ron Friedman <cryogen65@gmail.com> * Add delay for GameBoost Adding 10 seconds before changing the priority to allow for the process to initialize. Also move to its own method to avoid error mixed up with main game launching method error(s). Also also, fix some code QA problems on the changed section because might as well :ahuehue: * Update WindowsAppSDK to 1.5.0 Related #418 * (DiscordRPC) Reset `_firstTimeConnect` for new client * Use Waifu2X to enlarge background image (#412) * Use Waifu2X to enlarge background image * More checks * Resize to window size We will not get pixelated image using MagicScaler * Code cleanup * Rename models folder name * Add some useful logs * Auto detect GPU discrete > integrated > others * Enable OpenMP for speed * [skip ci] Add WAIFU2X.LICENSE and OPENMP.LICENSE * Minor fixes --------- Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com> * [skip ci] Use ex variable on GameBoost_Invoke oops... * (CodeQA) SettingsPage - Change copyright year - Sync maintainers - Suppress null scans (take it ReSharper!) - Suppress unrelated Xaml warnings * Stop "open -p" from starting a game when not updated * (Waifu2X) Fix failed test log * [skip ci] Sync translation Translate en_US.json in es_419 100% reviewed source file: 'en_US.json' on 'es_419'. * [skip ci] Sync translation Translate en_US.json in ja_JP 100% reviewed source file: 'en_US.json' on 'ja_JP'. * (Waifu2X) Fix crash on exit * [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. * Fix CustomBG checkbox logic :derp: * Fix Level of Detail setting order for Hi3 * Read the cache reference from stream for Hi3 * Keyboard Shortcut improvements (#416) * Revamp how shortcuts are saved and fix UI margins * Convert old shortcut list * Minor refactor + Fix KbShortcut related flyout crash * Allow localization of VirtualKeyModifiers * Remove invalid shortcuts and save if the dictionary is altered * Qodana * Parse kbshortcuts .ini only when enabling the shortcuts * Turn DefaultShortcutList into a readonly field * (KbShortcuts) Get GameCount and MaxRegions from Metadata * Remove Equals/HashCode and directly compare values * Update KeyboardShortcuts.cs * No possible multiple enumerations while loading shortcuts * Fix validity check for new shortcut combinations * (KeyboardShortcut) CodeQA - Suppress null warnings - Wrap long lines - Remove unnecessary statement * (KeyboardShortcut) CodeQA part 2 Bc no save :( * (Keyboard Shortcut) Fix opacity animation --------- Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com> * [skip ci] Sync translation Translate en_US.json in es_419 100% reviewed source file: 'en_US.json' on 'es_419'. * [skip ci] Sync translation Translate en_US.json in ja_JP 100% reviewed source file: 'en_US.json' on 'ja_JP'. * [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. * [skip ci] Bump version * Add function to launch game in alt (legacy Collapse) launch mode * Update NuGet(s) - MagicScaler 0.14.0 -> 0.14.2 https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.1 https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.2 - BuildSDK * Small refactor on HomePage.StartGame - Avoid multiple call on the same parameter - Avoid unnecessary call on unused parameter - Use async overload when disposing ResizableWindowHookToken - Avoid NRE if WatchOutputLog is unexpectedly cancelled before the time - Suppress some NRE --------- Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com> Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com> Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com> Co-authored-by: Shatyuka <958182453@qq.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Ron Friedman <cryogen65@gmail.com>
* [skip ci] Update README.md * Clamp column width if there is no space left This to fix the DataTable component causing a crash due to negative value if small window mode is used. * Enable Rich Presence only after the activated region is set might fix #402 * Fix blurry console icon Also, get the icon from exe rather than a separate ico file * (CodeQA) Theme xaml * Move RPC dispose Adjusted to be in the same file where it is initialized (448ff77) * Change default value displayed for ```Download Threads``` to match the real default value * Auto resize DataTable column width using star L.CRC and R.CRC are hidden in small window mode before this commit. * [skip ci] Update LICENSE and its references * [skip ci] Update SECURITY.md - Added @shatyuka and @gablm to the active maintainers list - Update supported version section * [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. * HI3 Senadina Game Settings Adjustments (#417) * (GSP) HI3: Adjust to new version * [skip ci] Add more abbreviation list * Use ShouldComputeInputPris on build To try mitigate resource not found error * (GSP) More Hi3 Senadina backend changes * (GSP) Force GraphicsGrade to 6 on Save * (GSP) Docs * (GSP) Senadina frontends and localization * (GSP) Disable preset * CodeQA stuff * Fix crash due to value not exist for ``GraphicsReflectionQuality`` * Move and change Physics toggle to ``ToggleSwitch`` * review adjustments * Review adjustment - Use comparedTo instead of TypeExtensions for Equals() in PhysicsSimulation.cs - Adjustment on comparedTo in GraphicsGrade.cs - Remove unnecessary int declaration in Honkai\RegistryClass\Enums.cs --------- Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com> Co-authored-by: Ron Friedman <cryogen65@gmail.com> * Add delay for GameBoost Adding 10 seconds before changing the priority to allow for the process to initialize. Also move to its own method to avoid error mixed up with main game launching method error(s). Also also, fix some code QA problems on the changed section because might as well :ahuehue: * Update WindowsAppSDK to 1.5.0 Related #418 * (DiscordRPC) Reset `_firstTimeConnect` for new client * Use Waifu2X to enlarge background image (#412) * Use Waifu2X to enlarge background image * More checks * Resize to window size We will not get pixelated image using MagicScaler * Code cleanup * Rename models folder name * Add some useful logs * Auto detect GPU discrete > integrated > others * Enable OpenMP for speed * [skip ci] Add WAIFU2X.LICENSE and OPENMP.LICENSE * Minor fixes --------- Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com> * [skip ci] Use ex variable on GameBoost_Invoke oops... * (CodeQA) SettingsPage - Change copyright year - Sync maintainers - Suppress null scans (take it ReSharper!) - Suppress unrelated Xaml warnings * Stop "open -p" from starting a game when not updated * (Waifu2X) Fix failed test log * [skip ci] Sync translation Translate en_US.json in es_419 100% reviewed source file: 'en_US.json' on 'es_419'. * [skip ci] Sync translation Translate en_US.json in ja_JP 100% reviewed source file: 'en_US.json' on 'ja_JP'. * (Waifu2X) Fix crash on exit * [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. * Fix CustomBG checkbox logic :derp: * Fix Level of Detail setting order for Hi3 * Read the cache reference from stream for Hi3 * Keyboard Shortcut improvements (#416) * Revamp how shortcuts are saved and fix UI margins * Convert old shortcut list * Minor refactor + Fix KbShortcut related flyout crash * Allow localization of VirtualKeyModifiers * Remove invalid shortcuts and save if the dictionary is altered * Qodana * Parse kbshortcuts .ini only when enabling the shortcuts * Turn DefaultShortcutList into a readonly field * (KbShortcuts) Get GameCount and MaxRegions from Metadata * Remove Equals/HashCode and directly compare values * Update KeyboardShortcuts.cs * No possible multiple enumerations while loading shortcuts * Fix validity check for new shortcut combinations * (KeyboardShortcut) CodeQA - Suppress null warnings - Wrap long lines - Remove unnecessary statement * (KeyboardShortcut) CodeQA part 2 Bc no save :( * (Keyboard Shortcut) Fix opacity animation --------- Co-authored-by: Bagus Nur Listiyono <dzakibagus@gmail.com> * [skip ci] Sync translation Translate en_US.json in es_419 100% reviewed source file: 'en_US.json' on 'es_419'. * [skip ci] Sync translation Translate en_US.json in ja_JP 100% reviewed source file: 'en_US.json' on 'ja_JP'. * [skip ci] Sync translation Translate en_US.json in zh_CN 100% reviewed source file: 'en_US.json' on 'zh_CN'. * [skip ci] Bump version * Add function to launch game in alt (legacy Collapse) launch mode * Update NuGet(s) - MagicScaler 0.14.0 -> 0.14.2 https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.1 https://github.com/saucecontrol/PhotoSauce/releases/tag/v0.14.2 - BuildSDK * Small refactor on HomePage.StartGame - Avoid multiple call on the same parameter - Avoid unnecessary call on unused parameter - Use async overload when disposing ResizableWindowHookToken - Avoid NRE if WatchOutputLog is unexpectedly cancelled before the time - Suppress some NRE --------- Co-authored-by: Ron Friedman <9833218+Cryotechnic@users.noreply.github.com> Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com> Co-authored-by: Gabriel Lima <44784408+gablm@users.noreply.github.com> Co-authored-by: Shatyuka <958182453@qq.com> Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Ron Friedman <cryogen65@gmail.com>
More testing is still needed, especially for old PCs.
Comparison:
native source code here