Giter Club home page Giter Club logo

waifu2x-gui's Introduction

Waifu2x GUI

This is a GUI app that can upscale anime-styled images, gifs, and videos using waifu2x, Real-ESRGAN, or Real-CUGAN. It aims to be simple to use, but you can access more advanced settings in the top bar.

Note: Upscaling videos and gifs will take a very long time without a high-end graphics card!

Features:

  • Upscale and/or denoise images (png, jpg, webp, etc.)
  • Upscale and/or denoise animated images (gif, animated webp)
  • Upscale and/or denoise videos (mp4, webm, ogv, etc.)
  • Upscale and/or denoise PDFs (pdf)
  • Apply effects such as speed or reverse (animated images/videos)
  • Customize settings (noise, scale, mode, framerate, etc.)
  • Upscale multiple images (or multiple frames of an animated image/video) concurrently
  • Change the upscaler (waifu2x, Real-ESRGAN, Real-CUGAN, or custom)

Warning: Upscaling too many images in parallel can cause your computer to freeze if it runs out of CPU/memory.

Waifu2x

Waifu2x only supports scale factors in multiples of 2 from 1/2/4 and noise level -1/0/1/2/3 (set to -1 for no denoise).

Real-ESRGAN

Real-ESRGAN only supports scale factors between 2-4, and all other options are ignored. By setting the scale factor to 4x, it will use the slower Anime4x model that gives better results, so it is recommended to upscale images at 4x when using Real-ESRGAN.

Real-CUGAN

Real-CUGAN only supports scale factors 1/2/3/4, and noise level -1/0/1/2/3 and only noise 0 and 3 for scale factors 3/4. This is probably the best performing upscaler out of the defaults.

Custom Models

You can add custom pytorch models to the "models" folder in the location the app is installed, same place ffmpeg folder is located. If the folder doesn't exist, create it. You need to install python in order to run them. If you still have trouble, try installing the dependencies:

pip3 install torch torchvision opencv-python Pillow numpy spandrel --compile --force-reinstall

Installation

To install, download the latest installer from the releases tab. Updates can be installed automatically.

Note: If you install it under C:/Program Files you might need to run it as administrator.

MacOS

On MacOS unsigned applications won't open, run this to remove the quarantine flag.

xattr -d com.apple.quarantine /Applications/Waifu2x\ GUI.app

Bugs and Requests

Open an issue on my GitHub repository. I appreciate any requests, but I can't guarantee that I will fulfill all of them.

Related/Credits

waifu2x-gui's People

Contributors

tenpi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

waifu2x-gui's Issues

Win11 Virtual Machine Open Error

A JavaScript error occurred in the main process

The virtual machine is very clean, without a runtime library environment or anything like that

win 11 23H2 x64

Failed to run AppImage

Error in GUI:
A JavaScript error occurred in the main process

Uncaught Exception:

Error: EROFS: read-only file system, chmod '/

tmp/.mount_Waifu2BswDij/ffmpeg/ffmpeg at Object.chmodSync (fs.js:1320:3)

at App. (/tmp/.mount_Waifu2BswDij/resources/ app.asar/dist/main.js:233:15466) at App.emit (events.js:376.20)

Error in terminal:
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

OS: Garuda

Color loss while upscaling videos

From what I can see (when I compare images from temp folders, there is no color difference) it is because of FFmpeg, but trying to make settings as lossless as possible didn't help :/ For example, left is original while right is upscaled. It is most obvious at red-purple colors.

Original 2X

W2X shows its upscaling but it does not save the images - ergo - cannot create upscaled video

After it's 1st run - the app creates the images and creates the folder for saving upscaled images but does not actually save them in the folder. When it then finishes upscaling per the app, it obviously cannot find any upscaled images in that folder and throws an error message
Screenshot 2023-05-06 at 9 38 58 PM

Note that this error persists across version till the latest one. I am running a Macbook Pro M1 Pro
.

Real-ESRGAN webm conversion not working

Tried to upscale a 1080p webm 4x using Real-ESRGAN. It splits the webm into frames, the threading and parallel frame options seem to work fine, but the upscaled frames folder is just not populating with the upscaled frames.

I can see the conhosts and each of the -vulkan.exes seemingly processing the frame, but it seems to not be writing out the upscaled frame. I've got an NVIDIA 3090 paired with a 11700k.

AppImage fails to launch

System info: EndeavourOS x86_64 kernel 6.3.1-arch1-1 (Arch derivative)

When running the AppImage the following is outputted to the terminal (./Waifu2x-GUI-0.4.0.AppImage):

A JavaScript error occurred in the main process
Uncaught Exception:
Error:
Something went wrong installing the "sharp" module

libvips-cpp.so.42: cannot open shared object file: No such file or directory

Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current linux-x64 runtime: "npm install --platform=linux --arch=x64 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/tmp/.mount_Waifu2Bs9nva/resources/app.asar/node_modules/sharp/lib/sharp.js:34:9)
at Module._compile (internal/modules/cjs/loader.js:1083:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1113:10)
at Module.load (internal/modules/cjs/loader.js:940:32)
at Module._load (internal/modules/cjs/loader.js:781:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:964:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/tmp/.mount_Waifu2Bs9nva/resources/app.asar/node_modules/sharp/lib/constructor.js:8:1)
at Module._compile (internal/modules/cjs/loader.js:1083:30)

(waifu2x-gui:371768): Gtk-WARNING **: 18:55:21.430: Theme parsing error: gtk.css:1649:16: '-gtk-icon-size' is not a valid property name

(waifu2x-gui:371768): Gtk-WARNING **: 18:55:21.430: Theme parsing error: gtk.css:1652:16: '-gtk-icon-size' is not a valid property name
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

The process does not stop, but no UI opens and no further info is outputted on the terminal.

I can install the sharp npm module, like the output recommends just fine (no errors), but this does not have any effect on the appimage functioning. Here's the output of that npm install, although I doubt it'll be of any use:

$ npm install --ignore-scripts=false --foreground-scripts --verbose sharp
npm verb cli /home/quinten/.nvm/versions/node/v18.15.0/bin/node /home/quinten/.nvm/versions/node/v18.15.0/bin/npm
npm info using [email protected]
npm info using [email protected]
npm verb title npm install sharp
npm verb argv "install" "--ignore-scripts" "false" "--foreground-scripts" "--loglevel" "verbose" "sharp"
npm verb logfile logs-max:10 dir:/home/quinten/.npm/_logs/2023-05-07T16_58_35_610Z-
npm verb logfile /home/quinten/.npm/_logs/2023-05-07T16_58_35_610Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/sharp 136ms (cache revalidated)
npm info run [email protected] install node_modules/sharp (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

> [email protected] install
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 208ms
sharp: Using cached /home/quinten/.npm/_libvips/libvips-8.14.2-linux-x64.tar.brorg/-/npm/v1/security/advisories/bulk 208ms
sharp: Integrity check passed for linux-x64tch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 208ms
prebuild-install info begin Prebuild-install version 7.1.1tps://registry.npmjs.org/-/npm/v1/security/advisories/bulk 208ms
prebuild-install info looking for local prebuild @ prebuilds/sharp-v0.32.1-napi-v7-linux-x64.tar.gz
prebuild-install info looking for cached prebuild @ /home/quinten/.npm/_prebuilds/8ad733-sharp-v0.32.1-napi-v7-linux-x64.tar.gz
prebuild-install info found cached prebuild
prebuild-install info unpacking @ /home/quinten/.npm/_prebuilds/8ad733-sharp-v0.32.1-napi-v7-linux-x64.tar.gz
prebuild-install info unpack resolved to /home/quinten/Downloads/node_modules/sharp/build/Release/sharp-linux-x64.node08ms
prebuild-install info install Successfully installed prebuilt binary!
npm info run [email protected] install { code: 0, signal: null }

added 45 packages, and audited 46 packages in 1s

10 packages are looking for funding
run `npm fund` for details

found 0 vulnerabilities
npm verb exit 0
npm info ok

DiscardVirtualMemory procedure not found

when i install versions 0.4.3 and up (would probably be the same for 0.4.2). 0.4.1 works fine.
windows 8.1.
i think you ended up breaking it for 8.1. you can probably add a note somewhere that it requires win10.
will have to use something else.

Thank you for clean and easy to use GUI (and 2 issues :)

I really loved how clean it is.

But looks like it doesn't work on video files. I tried with both mp4 and webm but both of them failed. It creates the image folder and upscale images, but then it fails to create video again. GIF works tho.

And one more issue/request, can we have an option to put files near original ones instead of a single folder? I think it would be lot better overall.

can not pnpm run start+

[email protected] clean
del-cli ./dist

/home/shuang/Desktop/github/electron/Waifu2x-GUI/node_modules/.pnpm/[email protected]/node_modules/loader-runner/lib/LoaderRunner.js:146
if(isError) throw e;
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)

Real-ESRGAN don't work

Sorry, English is not my native language.
When I zoom in on an image using Real-ESRGAN, the program does not output any image.
Waifu2x_GUI_v2lonv4DMq.png

macOS Universal 2 Binary Support Request

I noticed Intel support got dropped after 0.4.1 for macOS. Could you post Universal 2 binaries? The latest releases are arm64 which are strictly for Apple Silicon based Macs. Thanks.

Not working?

I've installed this program but when I click start on anything it immediately says it's finished and doesn't output anything. I've tried changing various settings but still can't get it to work.

Webm doesn't complete conversion.

When converting a webm file it creates all the upscaled images (for some reason in jpg, even if I specify no jpg compression), creates an MP4 file of the upscaled video and creates an unplayable webm file.

I'm assuming that the mp4 file is not getting correctly converted to webm?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.