Anime4KCPP

TianZerLGPL-3.0更新放缓

用 C++ 实现的高性能动漫图像放大工具,支持 GPU 加速和 CNN 算法,可作 AviSynth+ 插件或 DirectShow 滤镜接入视频处理流程。

A high performance anime upscaler

v3.2.0发布于 2026-05-10 16:23 UTC2,042star145fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
mkdir build && cd build
cmake .. -DAC_CORE_WITH_OPENCL=ON
cmake --build . --config Release -j8
cd bin
./ac_cli -v
硬件要求按 README 说明

README 未给出具体显存要求;CUDA 后端需 CUDA Toolkit 11 及以上,OpenCL 后端需 OpenCL SDK,纯 CPU 也可运行并自动启用 SIMD 指令集;Windows、Linux、Termux、macOS(10.12+)与 WASM 均有构建说明。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

基于 CNN 的高性能动漫图像放大工具,提供 CLI、GUI 和多语言绑定

用 C++ 实现的高性能动漫图像放大工具,支持 GPU 加速和 CNN 算法,可作 AviSynth+ 插件或 DirectShow 滤镜接入视频处理流程。

核心能力

  • 用 CNN 算法对动漫图像做超分辨率放大
  • 核心支持 OpenCL、CUDA 与 Eigen3 多种后端
  • 自动检测并启用 SSE、AVX、NEON 等 SIMD 指令集
  • 可构建 CLI、Qt GUI、视频模块及 AviSynth、VapourSynth 滤镜
  • 提供 Python 绑定与 WebAssembly 浏览器版本

容易踩的坑

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

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v3.2.0
  1. 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.

  2. 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.

  3. 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

  4. 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 jpg jpeg and bmp (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

  5. 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 -v and specifying the output suffix as gif).
    • 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

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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 use pkg-config or require explicit path specification via CMake variables.
    • For certain dependencies, dedicated CMake variables (e.g., AC_PATH_XXX) are provided.
    • Setting these variables will:
      1. Direct CMake to search in your specified paths first
      2. Override default search locations

    List of dependencies

    DependencyCMake optionModuleAcquisitionManual Configuration
    CUDA ToolkitAC_CORE_WITH_CUDAcore(CUDA)Manualfind_package
    libavcodecAC_BUILD_VIDEOvideoManualpkg-config / AC_PATH_FFMPEG
    libavformatAC_BUILD_VIDEOvideoManualpkg-config / AC_PATH_FFMPEG
    libavutilAC_BUILD_VIDEOvideoManualpkg-config / AC_PATH_FFMPEG
    libswscaleAC_BUILD_VIDEOvideoManualpkg-config / AC_PATH_FFMPEG
    QtAC_BUILD_GUIguiManualfind_package
    Avisynth SDKAC_BUILD_FILTER_AVISYNTHfilter(avisynth)AutomaticAC_PATH_AVISYNTH_SDK
    CLI11AC_BUILD_CLIcliAutomaticfind_package / AC_PATH_CLI11
    DirectShow BaseClassesAC_BUILD_FILTER_DIRECTSHOWfilter(directshow)AutomaticAC_PATH_DIRECTSHOW_BASECLASSES
    Eigen3AC_CORE_WITH_EIGEN3core(eigen3)Automaticfind_package / AC_PATH_EIGEN3
    OpenCL SDKAC_CORE_WITH_OPENCLcore(opencl)Automaticfind_package
    pybind11AC_BUILD_BINDING_PYTHONbinding(python)Automaticfind_package
    ruapuN/AcoreAutomaticAC_PATH_RUAPU
    stbN/AcoreAutomaticAC_PATH_STB
    fpngAC_CORE_WITH_FPNGcoreAutomaticAC_PATH_FPNG
    halfN/AcoreAutomaticAC_PATH_HALF
    VapourSynth SDKAC_BUILD_FILTER_VAPOURSYNTHfilter(vapoursynth)Automaticpkg-config / AC_PATH_VAPOURSYNTH_SDK
    doctestAC_BUILD_TESTStestsAutomaticfind_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

    OptionDescriptionDefault
    AC_SHARED_LIBbuild as a shared libraryOFF
    AC_CORE_WITH_EIGEN3build core with eigen3OFF
    AC_CORE_WITH_SSEbuild core with x86 sseAuto detect
    AC_CORE_WITH_SSE2build core with x86 sse2Auto detect
    AC_CORE_WITH_AVXbuild core with x86 avxAuto detect
    AC_CORE_WITH_AVX2build core with x86 avx2Auto detect
    AC_CORE_WITH_AVX512build core with x86 avx512Auto detect
    AC_CORE_WITH_FMAbuild core with x86 fmaAuto detect
    AC_CORE_WITH_NEONbuild core with arm neonAuto detect
    AC_CORE_WITH_RVVbuild core with risc-v vectorAuto detect
    AC_CORE_WITH_LSXbuild core with loongarch lsxAuto detect
    AC_CORE_WITH_LASXbuild core with loongarch lasxAuto detect
    AC_CORE_WITH_MSAbuild core with mips msaAuto detect
    AC_CORE_WITH_ALTIVECbuild core with powerpc altivecAuto detect
    AC_CORE_WITH_VSXbuild core with powerpc vsxAuto detect
    AC_CORE_WITH_WASM_SIMD128build core with wasm simd128Auto detect
    AC_CORE_WITH_OPENCLbuild core with openclOFF
    AC_CORE_WITH_CUDAbuild core with cudaOFF
    AC_CORE_WITH_FPNGbuild core with fpngON
    AC_CORE_ENABLE_FAST_MATHenable fast math for coreOFF
    AC_CORE_DISABLE_IMAGE_IOdisable image file read and write for coreOFF
    AC_BUILD_CLIbuild cliON
    AC_BUILD_GUIbuild guiOFF
    AC_BUILD_VIDEObuild video moduleOFF
    AC_BUILD_FILTER_AVISYNTHbuild avisynth filterOFF
    AC_BUILD_FILTER_VAPOURSYNTHbuild vapoursynth filterOFF
    AC_BUILD_FILTER_DIRECTSHOWbuild directshow filter (Windows only)OFF
    AC_BUILD_FILTER_AVISYNTH_VAPOURSYNTHbuild an avisynth and vapoursynth universal filterOFF
    AC_BUILD_BINDING_Cbuild c binding for coreOFF
    AC_BUILD_BINDING_PYTHONbuild python binding for coreOFF
    AC_TOOLS_BENCHMARKbuild benchmarkOFF
    AC_BUILD_TESTSbuild testsOFF
    AC_ENABLE_LTOenable LTOOFF
    AC_ENABLE_STATIC_CRTenable static link crtOFF
    AC_DISABLE_RTTIdisable rttiOFF
    AC_DISABLE_EXCEPTIONdisable exceptionOFF
    AC_DISABLE_PICdisable pic or pieOFF

    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.