CUDA、FFmpeg、Qt 等依赖需手动准备,CMake 只自动下载部分依赖;视频模块需 FFmpeg 4 及以上并建议用 AC_PATH_FFMPEG 指定路径;GUI、视频、滤镜等模块默认关闭,需显式加 -DAC_BUILD_* 选项开启。

Anime4KCPP
TianZerLGPL-3.0更新放缓用 C++ 实现的高性能动漫图像放大工具,支持 GPU 加速和 CNN 算法,可作 AviSynth+ 插件或 DirectShow 滤镜接入视频处理流程。
A high performance anime upscaler
mkdir build && cd build
cmake .. -DAC_CORE_WITH_OPENCL=ON
cmake --build . --config Release -j8
cd bin
./ac_cli -vREADME 未给出具体显存要求;CUDA 后端需 CUDA Toolkit 11 及以上,OpenCL 后端需 OpenCL SDK,纯 CPU 也可运行并自动启用 SIMD 指令集;Windows、Linux、Termux、macOS(10.12+)与 WASM 均有构建说明。
基于 CNN 的高性能动漫图像放大工具,提供 CLI、GUI 和多语言绑定
用 C++ 实现的高性能动漫图像放大工具,支持 GPU 加速和 CNN 算法,可作 AviSynth+ 插件或 DirectShow 滤镜接入视频处理流程。
核心能力
- 用 CNN 算法对动漫图像做超分辨率放大
- 核心支持 OpenCL、CUDA 与 Eigen3 多种后端
- 自动检测并启用 SSE、AVX、NEON 等 SIMD 指令集
- 可构建 CLI、Qt GUI、视频模块及 AviSynth、VapourSynth 滤镜
- 提供 Python 绑定与 WebAssembly 浏览器版本
容易踩的坑
- v3.2.0Release version v3.2.0最新正式版2026-05-10 · 2026-05-10 16:23 UTC
Long time no see, Anime4KCPP v3.2 is ready. Anime4KCPP v3.2 optimizes performance and introduces more models.
First are ACNet and ARNet, which have been redesigned and retrained. The previous ACNet model is now referred to as ACNet-Legacy. ACNet and ARNet offer models of various sizes, which can be selected based on your hardware configuration. Each size provides 4 variants:
no suffix: trained to be neutral.hdn: trained to mildly denoise.box: trained to be neutral through box degradation, which is better for line restoration, but may appear slightly blurry.box-hdn: trained to mildly denoise based on the box variant.
If you are interested in the training of ACNet and ARNet, or the scripts for exporting them to GLSL, please check out the training code.
We have also integrated Artoriuz's ArtCNN series, igv's FSRCNNX series, and nessotrin's FSRCNNX-DistortPlus series. Thanks for their wonderful work.
Full model list is available in wiki. You can try these models and test their effects directly in your browser via the WASM-driven Anime4KCPP Playground.
In terms of performance, whether using CPU, OpenCL, or CUDA processing, v3.2 is faster than v3.0. With smaller models such as ACNet_F8B4, Anime4KCPP can achieve real‑time processing even on low‑end hardware.
Besides, we have added HDR support in the DirectShow filter, as well as support for YUV422 and YUV444 video formats. In the video module, we support more formats, including 12‑bit video and grayscale video. Various other detail improvements and optimizations are also included.
Please ensure the latest Visual C++ Redistributable is installed prior to using the precompiled MSVC binaries.
Check wiki for more information.
- v3.0.0Release version v3.0.02025-08-01 · 2025-08-01 07:59 UTC
查看更新说明
Since the release of v2.5.0, a significant amount of time has passed. During this period, I completely rewrote Anime4KCPP and now present the brand new v3.0.0 version.
Anime4KCPP V3 is an entirely new release and is not backward compatible with previous versions. This version no longer supports the Anime4K09 algorithm, focusing solely on optimizing the CNN-based algorithm instead. It supports CPU instruction set acceleration, OpenCL acceleration, and CUDA acceleration.
Anime4KCPP V3 utilizes FFmpeg for video processing and allows you to specify output bitrate, encoder, and pixel format to customize encoding quality to some extent. For advanced usage, VapourSynth or AviSynth is recommended.
DirectShow filters, AviSynth plugins, and VapourSynth plugins are now supported and provided as pre-compiled 32bit binaries. However, due to NVIDIA CUDA restrictions, the 32bit pre-compiled versions will not include CUDA support.
Check wiki for more information.
- v2.5.0Release version v2.5.02021-01-19 · 2021-01-19 04:19 UTC
查看更新说明
Main update
- Add CUDA support
- Add high precision processing support (32bit float and 16bit integer)
- Add grayscale support
- Improve the performance of OpenCL processor
- Bug fixes
CLI
- Add config file support
- Add video and GIF preview support
- Adjust output information
- Optimize folder processing
- Bug fixes
GUI
- Add Traditional Chinese, French and Japanese translation (Thanks for @semmyenator)
- Allow to specify global output suffix
- Add video and GIF preview support
- Structure will be preserved when processing folders
- Support non-ASCII input
- Support parallel image processing to improve performance
- Adjust output information
- Bug fixes
VapourSynth plugin
- Support 16bit integer and 32bit float processing (YUV and RGB)
- Support grayscale input
AviSynthPlus plugin
- Support 16bit integer and 32bit float processing (YUV)
- Support grayscale input
- Provide both anonymous clip (Anime4KCPP) and manually specified clip (Anime4KCPP2) interfaces #51
DSFilter
- 10bit (P010) and 16bit (P016) support
- Improve performance for NV12 input
- Bug fixes
Download in Gitee
- v2.4.0Release version v2.4.02020-10-01 · 2020-10-01 06:55 UTC
查看更新说明
Main update
- Improve performance.
- Add support for preserving the Alpha channel of output file as
jpgjpegandbmp(Merge alpha channel to RGB with black background). - Fixed performance problems for some resolutions.
- Add benchmark support.
- Bug fixes.
CLI
- Adjust the format of the help message.
- Add multithreading support for directory processing.
GUI
- Fixed incorrectly warning about invalid URL when closing input dialog.
- Add support for specifying FFmpeg path.
- Allow user to specify translation file path.
DSFilter
- Add support for non integer upscaling ratio.
Download in Gitee
- v2.3.0Release version v2.3.02020-08-07 · 2020-08-07 15:32 UTC
查看更新说明
Main update
- Add support for preserving the Alpha channel for transparent image.
- Add HDN level switching for ACNet, range from 1 to 3, higher for better denoising but may cause blur and lack of detail.
- Improve performance
CLI and GUI
- Add GIF support (treat as a video, CLI need adding
-vand specifying the output suffix asgif). - Allow processing video from URL.
- Allow non ASCII input for GUI.
- Update config for GUI.
- Bug fixes.
DSFilter
- Add resolution limit, it will not upscale if the video resolution threshold is exceeded.
- Fixed RGB format input may display weirdly.
- Add version display.
Android
- Add progress display for video processing.
Download in Gitee
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Anime4KCPP v3
Anime4KCPP is a high performance anime upscaler.
Anime4KCPP v3 uses CNN based algorithm, and aims to be simple and efficient.
Playground
Use Anime4KCPP Playground to upscale images in your browser with WebAssembly.
For the Microsoft Edge browser, to achieve optimal performance, you need to disable the Enhanced Security for the site.
Build
Dependency
Build tools:
- CMake
- A C++17 compatible compiler
Dependency handling:
- If you have internet access, CMake will automatically download and configure most required dependencies.
- You can also manually download dependencies.
Manual configuration (optional):
- Most dependencies are located via
find_package. Others may usepkg-configor require explicit path specification via CMake variables. - For certain dependencies, dedicated CMake variables (e.g.,
AC_PATH_XXX) are provided. - Setting these variables will:
- Direct CMake to search in your specified paths first
- Override default search locations
List of dependencies
| Dependency | CMake option | Module | Acquisition | Manual Configuration |
|---|---|---|---|---|
| CUDA Toolkit | AC_CORE_WITH_CUDA | core(CUDA) | Manual | find_package |
| libavcodec | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG |
| libavformat | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG |
| libavutil | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG |
| libswscale | AC_BUILD_VIDEO | video | Manual | pkg-config / AC_PATH_FFMPEG |
| Qt | AC_BUILD_GUI | gui | Manual | find_package |
| Avisynth SDK | AC_BUILD_FILTER_AVISYNTH | filter(avisynth) | Automatic | AC_PATH_AVISYNTH_SDK |
| CLI11 | AC_BUILD_CLI | cli | Automatic | find_package / AC_PATH_CLI11 |
| DirectShow BaseClasses | AC_BUILD_FILTER_DIRECTSHOW | filter(directshow) | Automatic | AC_PATH_DIRECTSHOW_BASECLASSES |
| Eigen3 | AC_CORE_WITH_EIGEN3 | core(eigen3) | Automatic | find_package / AC_PATH_EIGEN3 |
| OpenCL SDK | AC_CORE_WITH_OPENCL | core(opencl) | Automatic | find_package |
| pybind11 | AC_BUILD_BINDING_PYTHON | binding(python) | Automatic | find_package |
| ruapu | N/A | core | Automatic | AC_PATH_RUAPU |
| stb | N/A | core | Automatic | AC_PATH_STB |
| fpng | AC_CORE_WITH_FPNG | core | Automatic | AC_PATH_FPNG |
| half | N/A | core | Automatic | AC_PATH_HALF |
| VapourSynth SDK | AC_BUILD_FILTER_VAPOURSYNTH | filter(vapoursynth) | Automatic | pkg-config / AC_PATH_VAPOURSYNTH_SDK |
| doctest | AC_BUILD_TESTS | tests | Automatic | find_package / AC_PATH_DOCTEST |
- The minimum tested version of the CUDA Toolkit is 11.
- The minimum version of FFmpeg libraries is FFmpeg 4.
- Both Qt5 and Qt6 should be OK.
- VapourSynth SDK 4 is required.
- For non MSVC compilers, a modified version of the DirectShow BaseClasses will be used.
Platform
Windows
Tested with MinGW-w64, Clang and MSVC.
DirectShow filter is only available on Windows, tested compilers include MinGW-w64, ClangCL and MSVC.
Build with MinGW-w64:
mkdir build; cd build
cmake -G "MinGW Makefiles" .. -DAC_CORE_WITH_OPENCL=ON -DAC_ENABLE_STATIC_CRT=ON
cmake --build . --config Release -j8
cd bin
./ac_cli -v
Build with MSVC:
mkdir build; cd build
cmake -G "Visual Studio 17 2022" .. -DAC_CORE_WITH_OPENCL=ON
cmake --build . --config Release -j8
cd bin/Release/
./ac_cli -v
To setup FFmpeg libraries for building video module on Windows, it is recommended to add an AC_PATH_FFMPEG variable to CMake, but you can also use pkg-config for Windows. AC_PATH_FFMPEG should be a path to the FFmpeg's root folder witch contains lib and include.
To add AC_PATH_FFMPEG to CMake, click Add Entry button in cmake-gui or use -DAC_PATH_FFMPEG="path/to/ffmpeg/root" in terminal.
You can download FFmpeg with sdk from BtBN (ffmpeg-master-latest-win64-gpl-shared.zip or ffmpeg-master-latest-win64-lgpl-shared.zip) or gyan.dev (ffmpeg-release-full-shared.7z) for Windows.
Linux
Tested with gcc and Clang.
# Toolchain
sudo apt install cmake build-essential
# For video module:
sudo apt install pkg-config libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
# For GUI:
sudo apt install qt6-base-dev qt6-tools-dev
# For python binding:
sudo apt install python3-dev
mkdir build && cd build
cmake .. -DAC_CORE_WITH_OPENCL=ON #-DAC_BUILD_VIDEO=ON -DAC_BUILD_GUI=ON
cmake --build . --config Release -j8
cd bin
./ac_cli -v
Termux
To build with OpenCL support, you need install ocl-icd package, OpenCL SDK from Khronos seems not to be worked with termux.
pkg install cmake clang ocl-icd opencl-clhpp opencl-headers
mkdir build && cd build
cmake .. -DAC_CORE_WITH_OPENCL=ON
cmake --build . --config Release -j8
cd bin
LD_LIBRARY_PATH=/vendor/lib64:$PREFIX/lib ./ac_cli -l
WASM
Tested with Emscripten. check Anime4KCPP-Playground.
Mac OS
Tested with Apple Clang via github actions, MACOSX_DEPLOYMENT_TARGET >= 10.12 is required.
CMake options
| Option | Description | Default |
|---|---|---|
| AC_SHARED_LIB | build as a shared library | OFF |
| AC_CORE_WITH_EIGEN3 | build core with eigen3 | OFF |
| AC_CORE_WITH_SSE | build core with x86 sse | Auto detect |
| AC_CORE_WITH_SSE2 | build core with x86 sse2 | Auto detect |
| AC_CORE_WITH_AVX | build core with x86 avx | Auto detect |
| AC_CORE_WITH_AVX2 | build core with x86 avx2 | Auto detect |
| AC_CORE_WITH_AVX512 | build core with x86 avx512 | Auto detect |
| AC_CORE_WITH_FMA | build core with x86 fma | Auto detect |
| AC_CORE_WITH_NEON | build core with arm neon | Auto detect |
| AC_CORE_WITH_RVV | build core with risc-v vector | Auto detect |
| AC_CORE_WITH_LSX | build core with loongarch lsx | Auto detect |
| AC_CORE_WITH_LASX | build core with loongarch lasx | Auto detect |
| AC_CORE_WITH_MSA | build core with mips msa | Auto detect |
| AC_CORE_WITH_ALTIVEC | build core with powerpc altivec | Auto detect |
| AC_CORE_WITH_VSX | build core with powerpc vsx | Auto detect |
| AC_CORE_WITH_WASM_SIMD128 | build core with wasm simd128 | Auto detect |
| AC_CORE_WITH_OPENCL | build core with opencl | OFF |
| AC_CORE_WITH_CUDA | build core with cuda | OFF |
| AC_CORE_WITH_FPNG | build core with fpng | ON |
| AC_CORE_ENABLE_FAST_MATH | enable fast math for core | OFF |
| AC_CORE_DISABLE_IMAGE_IO | disable image file read and write for core | OFF |
| AC_BUILD_CLI | build cli | ON |
| AC_BUILD_GUI | build gui | OFF |
| AC_BUILD_VIDEO | build video module | OFF |
| AC_BUILD_FILTER_AVISYNTH | build avisynth filter | OFF |
| AC_BUILD_FILTER_VAPOURSYNTH | build vapoursynth filter | OFF |
| AC_BUILD_FILTER_DIRECTSHOW | build directshow filter (Windows only) | OFF |
| AC_BUILD_FILTER_AVISYNTH_VAPOURSYNTH | build an avisynth and vapoursynth universal filter | OFF |
| AC_BUILD_BINDING_C | build c binding for core | OFF |
| AC_BUILD_BINDING_PYTHON | build python binding for core | OFF |
| AC_TOOLS_BENCHMARK | build benchmark | OFF |
| AC_BUILD_TESTS | build tests | OFF |
| AC_ENABLE_LTO | enable LTO | OFF |
| AC_ENABLE_STATIC_CRT | enable static link crt | OFF |
| AC_DISABLE_RTTI | disable rtti | OFF |
| AC_DISABLE_EXCEPTION | disable exception | OFF |
| AC_DISABLE_PIC | disable pic or pie | OFF |
There are some convenient presets:
AC_PRESET_RELEASE
- AC_CORE_WITH_EIGEN3
- AC_CORE_WITH_OPENCL
- AC_CORE_WITH_CUDA
- AC_CORE_WITH_FPNG
- AC_CORE_ENABLE_FAST_MATH
- AC_BUILD_CLI
- AC_BUILD_GUI
- AC_BUILD_VIDEO
- AC_BUILD_FILTER_AVISYNTH_VAPOURSYNTH
- AC_BUILD_FILTER_DIRECTSHOW (Windows only)
LICENSE
The video module is under GPLv3, any module built with the video module are also under GPLv3, others under MIT. For example, if cli build with video module, it is under GPLv3, otherwise, it is under MIT.