Hacker News new | past | comments | ask | show | jobs | submit login
Upscayl – Free and Open Source AI Image Upscaler for Linux, macOS and Windows (github.com/upscayl)
296 points by stoicjumbotron on Aug 28, 2022 | hide | past | favorite | 77 comments



Why all the negativity in the comments here? Yes, sometimes it is extremely valuable to make a nice thin wrapper on existing tech. As a community, we can't always complain about the user interface of FOSS tools, and then when someone makes a UI, again complain that they haven't done anything or the size is large. Pick a side!


More feature rich UIs already exist as thin wrappers for this tech. Some linked from the Real-ESRGAN github repo. More importantly, Google Colab notebooks exist already as well, so you don't even need a graphics card.

People are allowed to question what aspect of this project this is novel. I believe it's a fair critique when many tools already exist. A criticism doesn't imply a negative connotation.

I personally appreciate the before/after comparison demo aspect of this tool. However, I value the ability to modify parameters and models more than a before and after comparison tool.

I see parameters/models are on the road map but I personally believe it should be part of a 1.0 release.

I personally am a fan of https://github.com/AaronFeng753/Waifu2x-Extension-GUI


The only reason why I built Upscayl was because there were no GUI solutions for Linux. Everywhere you see, Windows Windows Windows. Which is great for Windows people, but you already have Topaz Gigapixel, arguably the best piece of paid software I've ever seen.

I wanted something similar for Linux. After receiving "No, I don't think so" as a reply for my question about Image upscaler GUIs for Linux on r/opensource, I decided to build one of my own. I hope the GUI can benefit other people.


Don't let the haters get you down. This looks really useful.

Easily portable binaries that do one thing well are highly underrated. I will be trying this out on my PC.

Thank you!


Don't get turned off by the negativity - pretty nice cross-platform work you have here.


Thanks a lot! The appreciation really motivates me to keep making my projects better :)


Thank you for building it. Screw the haters on this website.


thank you for making this <3


It's Electron. That is why.


Maybe ask yourself why people chose to use Electron. The cross platform alternatives (Tauri[1] pops to mind) generally offer a more complex development experience. As long as web languages remain the lowest entrypoint they will remain the dominent force, even if they're less performant.

1: https://github.com/tauri-apps/tauri


You're absolutely right. I tried building Upscayl with Tauri initially, but after a few days I had to give up because I was trading my time for bundle size. Then I tried Neutralino only to discover that it does not support node runtime. With Electron, we were able to focus on the core features and ship Upscayl very fast.

Since electron is also the only framework that supports node modules, it was pretty much the best low-resistance path for us at the moment.

I do wanna learn Rust eventually but that is an adventure for another day :)


You deserve credit for this tool. I used it on a 35mm slide taken in 1982 that was scanned using a Nikon SUPER COOLSCAN 9000 ED. The original image was around 4000x3000 pixels. I ran it through and resized it back down and it's impressively better.

The binary at 160MB ran flawlessly on a HP Dev One laptop with Debian sid and processed the image in about 10 minutes. The difference is remarkable.

You have done a brilliant job of getting a simple front end on top of a huge pile of complicated under the hood by doing the smart thing: using your time efficiently so you can focus on the hard parts of the puzzle.


If Rust is too much of an adventure, maybe you'll find Go easier. Wails [1] is great if perhaps a bit more rough round the edges. Because it's go, package sizes are 10mb+ but nothing like Electron 30mb+

1. https://github.com/wailsapp/wails


As someone venturing in Tauri as primarily a web dev, I can relate to this so much. Rust is great and Tauri has some stellar benefits, but until you really master the borrow mechanics, it slows you down so much.


?? how is tauri a response to electron criticism? Imho the main criticism of electron is a criticism of using a webview for a desktop application where you could've used something far more simple. An alternative which would make electron critics be happy would be more like imgui or bindings to plateform native ui toolkits, but definitely not some other html ui framework.


Oh you're right. I was thinking Tauri was a cross-platform native UI kit. Imgui seems interesting but given it requires C++ knowledge that introduces all sorts of lifecycle issues regarding memory safety, etc, which makes it even more intimidating to newer SWEs.


ImGui does have a bunch of wrappers in different languages. [1]

That said, native-ish interface would feel better IMO. I always appreciate applications that “feel native”. Qt and Python's Toga [2] are a couple libraries that pop up in my mind.

[1]: https://github.com/ocornut/imgui/wiki/Bindings

[2]: https://beeware.org/project/projects/libraries/toga/


The app contacts Github's CDN every 45 seconds. Is there a particular reason / need for this behavior?

Tested on macOS with the following command:

  sudo tcpdump -k -i en0 | grep Upscayl


Just an aside as we all get Old Fat and Ugly, its actually a good thing to have such a simple reminder to grep for shit out of your egress just so you stay close to whats happening on the wire.

I haven't thought about TCPDUMP in a long time, and I appreciate this man page.


It must be because of the auto-update checker. It's a useful feature that lets us notify users about new versions and also let them download and install without opening the Github repository.


But you check for updates every 45 seconds? Why?


It's the electron-builder that's doing it, must be its default configuration. I'll see if I can fix the continuous checks and limit it to only at launch.


Thanks for taking a look at this!

Maybe the update check is not completing in time and hitting a 45 second timeout similar to [1]?

[1]: https://github.com/electron-userland/electron-builder/issues...


Why not use Real-ESRGAN directly?

https://github.com/xinntao/Real-ESRGAN


I actually tried, couldn't do it. Some version of numpy in their requirements.txt doesn't build with the Python on the my system.

Sure, I could probably install another Python with conda, but it's not my idea of fun. The app here actually worked fine from the first try, without taking gigabytes of disk space.


OK. That makes some sense. I tend to assume everyone with a CUDA-capable GPU is already using conda. But of course that's not true.


I followed the instructions in their README, they suggest conda, but don't tell you to use it.

My GPU isn't even CUDA-capable, but the previous version of Upscayl worked fine, possibly on the CPU. That might have changed, I don't know.

In any case, even with conda installing everything would have been a pain to someone not really accustomed to the Python ecosystem. I don't care too much about the GUI, but a working AppImage is really nice.


What GPU do you have? The Upscayl README says in big letters:

"NOTE: Upscayl does not work without a GPU, sorry. You'll need a Vulkan compatible GPU to upscale images. CPU or iGPU won't work."

Sure, perhaps a previous version may have worked without a GPU, but this seems surprising given that it uses a GPU-only library for all the heavy lifting.


The original python version uses pytorch/CUDA and requires nvidia. The Vulkan version doesn't.


Yeah, well, both versions work on my system. I don't know how to check if I'm getting any kind of acceleration, probably not on AMD.

EDIT: I think it's actually using Vulkan Compute on RADV.


Well you can use the ncnn version that is the backend for this program. https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan


I've always been confused with Conda, as it seems like overkill compared to just pyenv.

The fact that its not up to date on pypi and looking at their "getting started" is tens of pages of Windows bugs has always stopped me using it.


Yeah you know Python's software distribution problems are bad when someone makes an entire parallel packaging universe.


I do machine learning and use Python a lot, and even then I'd sometimes prefer something packaged like this. Dependencies are Python's hell and I can't usually know in advance if a repo will be a 1-minute install or a 15-minute install.


Visual feedback. Visual interface. The GUI fad is still around.


Right, but if a GUI is the only requirement, it might be simpler to use gradio.

It only takes a few lines (pasted from https://huggingface.co/spaces/akhaliq/Real-ESRGAN):

  gr.Interface(
      inference, 
      [gr.inputs.Image(type="pil", label="Input"),gr.inputs.Radio(["base","anime"], type="value", default="base", label="model type")], 
      gr.outputs.Image(type="file", label="Output"),
    title=title,
    description=description,
    article=article,
    examples=[
    ['bear.jpg','base'],
    ['anime.png','anime']
    ]).launch()


This UI wrapper doesn't have any way to set options for upsample or tile size parameters. I also don't see any way for it to set the model yourself.

https://github.com/xinntao/Real-ESRGAN

The Real-ESRGAN page has links to additional uis to try out.


Scaling is broken on Real-ESRGAN. That's why I had to remove the option for 2x and 3x and tiling can sometimes yield totally unexpected results. These 2 are the primary reasons why Upscayl doesn't show them.


Nice to see one of these that can use the GPU on my Mac laptop out of the box - I just tried it after installing from the .dmg, it worked great.


It's honestly a relief. I do not have MacOS so I had to compile the software with a MacOS VM without hardware passthrough, it took me a whole day to set that up. I wasn't able to test it on the VM (because of lacking hardware acceleration) but some nice people from the community helped us test it and find bugs and issues for the Mac builds :)


Don't GitHub Actions offer MacOS builds?


They do? Wow, I didn't know. I'll try setting up a workflow.


I have an Electron app on GitHub which uses their macOS runners to run tests and even package and sign the application: https://github.com/simonw/datasette-app/blob/84903f2ab171fb2...

Wrote up a bit about how that works here:

- https://til.simonwillison.net/electron/sign-notarize-electro...

- https://til.simonwillison.net/electron/testing-electron-play...


I like video2x[1] for this, a nice simple CLI with lots of different options for different cases, (especially the anime upscalers) used it quite a bit, also played with realcugan-ncnn-vulkan[2] which has given me pretty great results.

[1]: https://github.com/k4yt3x/video2x [2]: https://github.com/nihui/realcugan-ncnn-vulkan


Video2x - is it only for cartoon/anime video?


Would it be too difficult to add video upscaling feature to this? It'd really help with old videos.

I have videos I took on my Sony Ericsson w810i in the 2000s. The joy of being able to capture something animated on a small screen... I remember it used to show what song is playing at the top and I thought "cool, it shows banners similar to what we see at the bottom of news channels"! Would be great to elevate those videos to today's standards.


It’s not what you asked for exactly but I’ve had good success with this product

https://www.topazlabs.com/video-enhance-ai

Sometimes it drops the audio channel but it’s not too bad getting it added back in.


"Buy for $199.99"


Too much to pay to both fix up old memories and compensate skilled engineering?


re: Videos, that's the first item on the roadmap on the linked page


Anyone compared it against Topaz Labs' Sharpen AI/Gigapixel AI?

Which is better (putting paid vs open-source debate aside) in terms of result image quality?


Update: tried it, and it failed miserably.

I really wanted an open source project to be on par with a commercial/paid software but realistically speaking, the difference is day and night and Topaz wins hands down in my cases.


I tried Real-ESRGAN but it seems to dream up slightly too much? Has anyone else had this problem? It tends to generate details where there shouldn't be any.

Maybe I need to add some setting?


This is commonly called 'hallucination' and is a confound in super resolution. Its particularly concerning when people throw SISR at medical imaging ...


How does Real-ESRGAN used here compare to waifu2x ? I've had great success using waifu2x, especially for blurry artwork.


ESRGAN works better for photos in my testing.


NCNN does work with just CPU. Just need a little bit more packaging.


It really does need a GPU. Tried it on a laptop with integrated graphics and it crashed completely. Didn't even give a BSOD, machine just went dead and rebooted.


It's just relabeled Real-ESRGAN. Real-ESRGAN is still a very good solution, but I don't know if this project is contributing anything new.


We're making sure Real-ESRGAN reaches people who cannot use CLIs (so that pretty much includes 99% of the population). Also, I have a PR in the making for their ncnn-conversion script, it ain't much but it's honestly the best I can contribute when it comes to Python and AI.

Real-ESRGAN creator also encourages others to use their tech in their projects, as mentioned in their readme.

I know we're not really enhancing Real-ESRGAN's code at the moment, but we don't want to disrespect or disregard their hardwork either.


It sure does for me. The other projects linked here are I find overwhelming, Upscayl I find approachable.

The alternative I see to Upscayl would be some online service that's similarly approachable for "I just want to upscale this right now".


Thanks for the great tool! Although i know how to use those models, this makes my life more easier!!!!


Could something similar applied to 3D scanner points cloud ? Would Real-ESRGAN work in 3D ?


This is awesome... I wonder if we'll get something for video upscaling like this?


Another interesting feature might be image sharpener while maintaining the resolution?


That is planned :)


Zoom and enchance!


Blade Runner stuff !


"Make the whole world use FOSS"

At least they have realistic goals...


Was Upscail taken?


[flagged]


Show HN comment guidelines:

Be respectful. Anyone sharing work is making a contribution, however modest.

Ask questions out of curiosity. Don't cross-examine.

Instead of "you're doing it wrong", suggest alternatives. When someone is learning, help them learn more.

When something isn't good, you needn't pretend that it is, but don't be gratuitously negative.


The binaries themselves result in 10-25 megabytes. Along with that we ship multiple models currently.

I'm not sure if around 300mb would be considered 'bloat' for an AI Image Upscaler. People who have low end hardware unfortunately cannot use the application anyway.


Just had a look in the installed app on macOS:

    % du -h /Applications/Upscayl.app/Contents/Resources/models
    76M /Applications/Upscayl.app/Contents/Resources/models
76MB of models

    / % ls -lah /Applications/Upscayl.app/Contents/Resources/models
    total 155920
    drwxr-xr-x@ 14 simon  admin   448B Aug 27 04:44 .
    drwxr-xr-x@ 62 simon  admin   1.9K Aug 27 04:44 ..
    -rw-r--r--@  1 simon  admin    32M Aug 27 04:44 df2k.bin
    -rw-r--r--@  1 simon  admin   113K Aug 27 04:44 df2k.param
    -rw-r--r--@  1 simon  admin   1.2M Aug 27 04:44 realesr-animevideov3-x2.bin
    -rw-r--r--@  1 simon  admin   3.1K Aug 27 04:44 realesr-animevideov3-x2.param
    -rw-r--r--@  1 simon  admin   1.2M Aug 27 04:44 realesr-animevideov3-x3.bin
    -rw-r--r--@  1 simon  admin   3.1K Aug 27 04:44 realesr-animevideov3-x3.param
    -rw-r--r--@  1 simon  admin   1.2M Aug 27 04:44 realesr-animevideov3-x4.bin
    -rw-r--r--@  1 simon  admin   3.0K Aug 27 04:44 realesr-animevideov3-x4.param
    -rw-r--r--@  1 simon  admin   8.5M Aug 27 04:44 realesrgan-x4plus-anime.bin
    -rw-r--r--@  1 simon  admin    30K Aug 27 04:44 realesrgan-x4plus-anime.param
    -rw-r--r--@  1 simon  admin    32M Aug 27 04:44 realesrgan-x4plus.bin
    -rw-r--r--@  1 simon  admin   113K Aug 27 04:44 realesrgan-x4plus.param


I could probably save some size by removing the models that we aren't using but we eventually are going to use them in the next build so that's one of the stupid reasons I didn't remove it (probably should have).

Electron is definitely heavy but it's also the only framework that ships with node runtime, so it was the best option for us at the moment.


Thanks. I just sent this to my graphic designer friend and was very excited. This is a though crowd.


It's obviously the trained model that's heavy. It can't possibly be even close to 1mb.


It's the electron envelop




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: