Giter Site home page Giter Site logo

imxieyi / waifu2x-mac Goto Github PK

View Code? Open in Web Editor NEW
438.0 14.0 45.0 28.22 MB

Waifu2x-ios port to macOS, still in Core ML and Metal

License: MIT License

Swift 84.90% Metal 5.76% Objective-C 0.77% Shell 8.57%
waifu2x macos coreml metal superresolution machine-learning swift

waifu2x-mac's People

Contributors

chargeflux avatar guimondmm avatar imxieyi 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waifu2x-mac's Issues

Only the iGPU is used

Despite the Automatic graphics switching being disabled, only the UHD 630 iGPU resource on my MBP is being used, while the 560X usage stays at 0%. App compiled on Xcode 10.1. Is there any code/Xcode change necessary in order to enable the 560X usage?

Outputting Blank Images

I did ../waifu2x-mac-cli/waifu2x -t a -s 2 -n 2 -i "$file" -o "output/$file" to upscale some files, but it outputs a blank image at output/$file.

2018-06-23 10:18:15.601 waifu2x[82288:1013507] Maximum texture size supported: 16384
"With Alpha: true"
"Really With Alpha: true"

I tried other image files (jpeg) and they work great, but there seems to be an issue either with transparency or file size. The exact images I was upscaling can be found here: https://drive.google.com/drive/folders/1Ok9QfoeLz0XKYUBOHC5aVq4JWXhzyCas

It always build failed.

After the first build, I seem to have deleted the build folder by mistake(Combined with 2# floor, I seem to have never built successfully). I want to use build.sh to build again, but after dragging build.sh to Terminal, it always only executes the last operation to delete all files.
WX20200923-142310@2x

How to use build.sh to rebuild APP?

Multi-threading option?

I tried to use the CLI version and it has great speed.
But it uses only single thread.
ActivityMonitor.app shows it uses only 100% (other multi thread app uses 400 - 800% to conversion)
so I wander it has -j option (it uses for multi threading option at other waifu2x) to be more speed.

Unfortunately, Idk about the Metal and CoreML feature than you.
If you don't annoy with this order, please add new feature for choosing multithread.

Thank you for your great job 👍

Bit-depth support?

Is there going to be a feature in the future to support more than 24-bit png? I would like to feed it 32-bit images and have the bit depth retained.

If it will have an instrument panel, it would be fine.

I can't control the parameters and noise reduction of the amplification, and even which training model it uses is not clear.

There is also a small problem. Under 10.14, I can't see it working or occupying system resources in the istar menu.

Input and output arguments for the CLI version

Hi. Will you consider these possible improvements on the command-line arguments?

  • Remove the -i prefix for the input
  • Accept standard input and output (stdin & stdout)
  • Default output path (add a suffix -waifu2x.png, etc.)
  • Default values for scaling and denoise (-s 2 -n 1 for myself)
  • 1.6× scale in the original waifu2x

Stuck at generating

Not sure what is special about my setup, but I get stuck at "Generating" almost 100% of the time in the GUI. The models I have been trying to use are REAL-ESRGAN and REAL-CUGAN, and targeting 2x scaling.

Using the CLI I have never seen any lockup, an upscaled videos are processed correctly. My only issues are when using the GUI.

System is Mac Studio running Monterey 12.3, with M1 Max and 32GB of memory.

If there are any useful logs generated I am happy to include them here, because the GUI path is a very reliable failure for me.

Vapoursynth plugin

Could you possibly make a Vapoursynth plugin that is mac compatible using metal so this could be added to workflow scripts of animation videos.

Rather than a stand alone app or cli?

TTA support?

Hello. Is there TTA (test-time augmentation) support in the MacOS version already? I'm using the CLI version primarily, but I'm unsure if TTA is enabled by default or not at all. If they aren't features, could they be implemented? Thank you for this excellent GUI and CLI versions for Mac. You are a life-saver!

1.5 Upscale Factor?

Hi! I was wondering if it's possible to do a 1.5 upscale factor, instead of the currently available 1.0 and 2.0?

Upscale not working - segmentation fault & static results

Hi! The script was working fine since I first download but for some reason, it broke down today. I've attached the terminal messages and the upscale result too. It copies the original image to 4 horizontally and the rest is just fuzzy static.

I'm running on a MacBook Air with MacOS Catalina 10.15.6

Any help would be appreciated! :D

tilly@192-168-1-101 ~ % cd /Users/tilly/Downloads/Waifu2x 
tilly@192-168-1-101 Waifu2x % ./waifu.sh
"With Alpha: false"
"Really With Alpha: false"
./waifu.sh: line 8:  1078 Segmentation fault: 11  ./waifu2x -n 1 -s 2 -i "$source" -o "$outputpng"
"With Alpha: false"
"Really With Alpha: false"
./waifu.sh: line 8:  1079 Segmentation fault: 11  ./waifu2x -n 1 -s 2 -i "$source" -o "$outputpng"
"With Alpha: false"
"Really With Alpha: false"
"With Alpha: false"
"Really With Alpha: false"

Screenshot 2020-10-13 at 7 37 40 pm

dyld: Library not loaded: @rpath/libswiftCore.dylib

After a brew install on High Sierra v10.13.6 I'm finding a library that isn't linked, as per the title

λ MBP ~ → waifu2x --help                      
dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /usr/local/bin/waifu2x
  Reason: image not found
[1]    93255 abort      waifu2x --help
λ MBP ~ → xcode-select -v    
xcode-select version 2349.

CLI version

Hi! I was wonder if it is possible for you to make a CLI version of Waifu2x-mac because it would help with batch-processing. From looking at the code for the GUI, you call the function Waifu2x with the arguments 'img' and a predefined model when pressing the Process button. Unfortunately that is the extent of what I know about Swift and don't have the knowledge to make it into a CLI program.

I hope you can consider it or point me to how I could do it on my own. When I compiled Waifu2x_mac, I do get a UNIX executable in the framework but you can't run it from Terminal so that is probably not what is intended for.

Thanks!

Build failed and Xcode error

Hi, thank you for upload the waifu app for Mac user...but I have some problems with it :( I tried to build it and it failed, also when I used the Xcode, the app wouldn't build and I keep getting the error messages..please help me :'( Thank you

Build failed:
Screen Shot 2020-10-20 at 12 07 12 PM

Xcode error:
Screen Shot 2020-10-20 at 12 30 03 PM

Can't compile application with build.sh OR Xcode

Hey there! Trying to compile this myself, it won't work no matter what I do.

Attempting to compile in Xcode gives me this error inside of the Waifu2x.swift file:
Waifu2x.swift:203:9 The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions

Attempting to compile using the build.sh file in terminal gives:
image

I'm not sure what I'm doing wrong here, but nevertheless it isn't compiling.

Thanks!

Utilize GPU in the prediction phase

Hi, it seems that this app only utilizes Apple Neural Engine, while leaving all GPUs unused in the prediction phase.

Since all m1 processors have the same amount of neural engines, using M1 Max will not make this program any faster. Is it possible to use all GPUs to accelerate the predicting phase?

Thanks.

Update the linking of CLI version

Hi,

I believe I figured out how to bundle the CLI version with the app itself such if you go into waifu2x-mac-app.app/Contents/MacOS, you can choose to launch waifu2x-mac-app which is the GUI or waifu2x which is the CLI version. This ensures that the CLI version and GUI version are packaged together and the CLI doesn't need to be in the same directory as the frameworks.

I can submit a PR for these changes. It involves copying CommandLineKit to the Frameworks directory of the .app directory and adding a search path for the CLI version to reference that.

I also disabled installing the CLI version to /usr/local/bin and making sure the CLI version is only inside the App bundle since the executable in /usr/local/bin will fail because of missing frameworks.

Bulk conversions and remembering subfolders

This offshoot is missing several significant features compared to Waifu2x-Extension-GUI, with two glaring examples. One, it can't do bulk conversions or convert multiple files in a folder at once. Two, it does not remember subfolders, e.g. consistently stay where to pick files and where to save them. It all makes converting more than a couple of images extremely tedious especially compared to Windows programs. Why exactly is there no bulk conversion and is there any chance the folders where files are picked and saved can stay the same over different file conversions? It would be nice if the CLI could do bulk conversions with a wildcard (e.g. waifu2x -i /Users/Me/Downloads/Pictures/.jpg -o /Users/Me/Pictures/.png) which would render the other issue moot. I don't know what it means but currently doing this in the CLI outputs "With Alpha: False /n Really With Alpha: False."

TIFF Support?

The iOS app supports importing TIFF images (and then turning them into PNG) but on the Mac side, there's no support whatsoever. I was wondering if we could see support for 16-bit TIFF images as import and export options.

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.