explaingit

nagadomi/waifu2x

Analysis updated 2026-05-18

28,183LuaAudience · vibe coderComplexity · 4/5LicenseSetup · hard

TLDR

AI tool that enlarges images and removes compression noise using deep learning, originally built for anime art but works on photos too.

Mindmap

mindmap
  root((waifu2x))
    What it does
      Upscale images 2x
      Remove noise artifacts
      Batch process multiple
    Input & Output
      Low-res images
      Compressed photos
      Anime artwork
    Use cases
      Enlarge art for print
      Clean JPEG blur
      Restore old images
    Tech stack
      Lua code
      Torch7 framework
      NVIDIA GPU CUDA
    How to run
      Command line tool
      GUI alternatives exist
      Online versions available
    Audience
      Anime fans
      Photographers
      Digital artists
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Enlarge anime or illustration artwork for printing or display without losing quality.

USE CASE 2

Remove JPEG compression artifacts and blur from old or low-resolution photographs.

USE CASE 3

Batch upscale hundreds of images at once from the command line.

USE CASE 4

Restore detail in small thumbnail images for editing or archival purposes.

What is it built with?

LuaTorch7CUDANVIDIA GPU

How does it compare?

nagadomi/waifu2xnvchad/nvchadkoreader/koreader
Stars28,18328,14726,641
LanguageLuaLuaLua
Setup difficultyhardeasyhard
Complexity4/52/53/5
Audiencevibe coderdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires NVIDIA GPU with CUDA, Torch7 (legacy framework), and model weights, building from source on modern systems is difficult.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

waifu2x is an image upscaler and cleanup tool aimed at anime-style art, with a separate model that also handles regular photos. You hand it a small or noisy picture and it returns a larger, cleaner version, using deep convolutional neural networks rather than the simple stretching that built-in image editors perform. The repository points out that active development has moved to a PyTorch successor called nunif, so this codebase is the original Torch-based implementation. It offers three operations: noise reduction at four configurable levels, 2x upscaling, and a combined mode that does both in one pass. You can run it from the command line on a single file, on a list of files for batch conversion, or as a small web application that you open in a browser at a local URL. There is also a worked example in the README for upscaling video, where you extract the frames with avconv/ffmpeg, run waifu2x over each frame, and stitch them back together with the original audio. Switching to the photo model is just an extra command-line flag pointing at a different model directory. You would use it when you have a low-resolution anime image, screenshot, or illustration that you want to enlarge for a wallpaper, print, or asset reuse, and the usual image-editor enlargement looks blocky or smudged. The code is written in Lua on top of Torch7 and expects an NVIDIA GPU with CUDA installed (cuDNN optional for a speed boost). A Docker image is provided, and the README also mentions trying the hosted web demo at waifu2x.udp.jp before installing anything, plus separate Windows-friendly forks like waifu2x-caffe and waifu2x-ncnn-vulkan.

Copy-paste prompts

Prompt 1
How do I install and run waifu2x on my Windows machine to upscale anime images?
Prompt 2
Show me how to use waifu2x from the command line to both upscale and denoise a folder of images at once.
Prompt 3
What's the difference between waifu2x's anime model and photo model, and when should I use each?
Prompt 4
I don't want to install CUDA and Torch7, what are the easiest GUI or online alternatives to waifu2x?
Prompt 5
Can waifu2x remove JPEG compression artifacts from old photos, and how do I configure it for that?

Frequently asked questions

What is waifu2x?

AI tool that enlarges images and removes compression noise using deep learning, originally built for anime art but works on photos too.

What language is waifu2x written in?

Mainly Lua. The stack also includes Lua, Torch7, CUDA.

What license does waifu2x use?

Use freely for any purpose including commercial, as long as you keep the copyright notice.

How hard is waifu2x to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is waifu2x for?

Mainly vibe coder.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub nagadomi on gitmyhub

Verify against the repo before relying on details.