
waifu2x
Upscales and denoises anime-style art (and photos) using a Lua/Torch neural network.
- Stars
- 28.2k
- Forks
- 2.7k
- Licence
- MIT
- Language
- Lua
- Last update
- 3.5 years ago
- Type
- App
No commits in over a year — check for forks or alternatives before adopting.
What it is
waifu2x is a tool that enlarges images by two times and reduces noise, trained mainly on anime-style artwork and also offering a photo model. It runs as a command-line program or a local web app, using a deep convolutional neural network built on Torch7 and NVIDIA CUDA. The README notes that development has moved to a PyTorch successor project called nunif.
- Upscale a small anime illustration by 2x with the scale mode
- Reduce compression or sensor noise in an image with the noise modes
- Convert a folder of PNG or JPG files in one batch command
- Run the local web app at localhost:8812 for a browser interface
- Use the photo model by adding -model_dir models/photo
Great for
- People with an NVIDIA GPU who want to upscale anime-style illustrations
- Users comfortable running command-line tools on Linux
- Batch-converting a folder of images with one command
- Hobbyists who want to try a Torch-based super-resolution model
Not ideal for
- Anyone who wants current development: the README says work moved to nunif in 2023/02, and this repo's last push is 2023-05-04, so it is effectively a legacy codebase
- Users without an NVIDIA GPU, since the README lists NVIDIA GPU as the hardware requirement
- Beginners who want a one-click desktop app; the README points to a cloud or browser demo and third-party Windows tools for that
How to get it
- 1
Clone and build from source
You'll need: Torch7 · NVIDIA CUDA · NVIDIA GPU · LuaRocks packages: lua-csnappy, md5, uuid, csvigo, turbo · libsnappy-dev and libgraphicsmagick1-dev (Ubuntu packages named in the README)
Clone the repository
git clone --depth 1 https://github.com/nagadomi/waifu2x.gitEnter the folder and install Lua modules
cd waifu2x && ./install_lua_modules.shValidate the command-line tool
th waifu2x.lua - 2
Run it
- Install CUDA, Torch7, and the listed system packages following the README links
- Clone the repo and run ./install_lua_modules.sh
- Run th waifu2x.lua to validate the command-line tool
- Upscale an image with: th waifu2x.lua -m scale -i input_image.png -o output_image.png
- 3
Get the most out of it
- Add -force_cudnn 1 if you have the cuDNN library, which the README says is much faster
- Use -crop_size 128 (or similar) if you hit GPU out-of-memory errors
- Use -model_dir models/photo to switch to the photo model
- Use -l with a file list and -o with a %d pattern for batch conversion
- Run th web.lua to get a local browser interface at localhost:8812
Downloads
Strengths
- Widely known and proven on anime-style art, with a live demo site available
- Offers separate noise reduction, 2x upscaling, and combined modes
- Supports batch conversion and training your own models using the included scripts
Trade-offs
- Depends on old software: Torch7, CUDA setup notes reference Ubuntu 14.04/16.04 and CUDA 7.5 to 10.x, so setup is hard on modern systems
- Not actively developed here; the README directs new work to nunif
- No prebuilt binaries are provided with the latest release
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| waifu2x (this) | 28.2k | App | advanced | 3.5 years ago | People with an NVIDIA GPU who want to upscale anime-style illustrations |
| Anime4K | 21.6k | Other | intermediate | 2.2 years ago | People watching native 1080p anime on a 4K screen |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.