GNU Lesser General Public License v3.0

项目介绍

funnyplanter/CuNNy 是一个托管在 GitHub 上的开源项目,主要使用 GLSL 编写,采用 GNU Lesser General Public License v3.0 许可证,目前获得 170 个 Star、8 次 Fork。

仓库全名
funnyplanter/CuNNy
开源许可证
GNU Lesser General Public License v3.0
Star 数
170
Fork 数
8
未关闭 Issue
4

README 摘要

CuNNy - Convolutional upscaling Neural Network, yeah! Nice, small, and fast realtime CNN-based upscaler. Trained on visual novel screenshots/CG. Currently very new and immature 😭. Supports exporting to an mpv memeshader! And now a Magpie effect! Usage The order of quality is 8x32 > 4x32 > 4x24 > 4x16 > 4x12 > 3x12 > 2x12 > fast > faster > veryfast. Conversely the order of speed would be the reverse. The CuNNy-fast…

完整内容见 GitHub 原始 README 或本页 。

常见问题

CuNNy 用什么语言开发?

主要使用 GLSL 编写,采用 GNU Lesser General Public License v3.0 许可证,目前有 170 个 Star。

CuNNy 可以免费商用吗?

仓库标注的许可证为 GNU Lesser General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 CuNNy 的源码?

可以直接克隆仓库:git clone https://github.com/funnyplanter/CuNNy.git,默认分支为 master;安装与运行步骤见仓库 README。

CuNNy 最近还在维护吗?

仓库最近一次更新为 2025年8月29日,当前有 4 个未关闭 Issue;Star 数为 170,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Convolutional upscaling Neural Network, yeah!

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
192
价值分
104
活跃状态
活跃

语言占比

GLSL
HLSL
Python
Shell

README

CuNNy - Convolutional upscaling Neural Network, yeah!

Nice, small, and fast realtime CNN-based upscaler. Trained on visual novel screenshots/CG.

Currently very new and immature 😭.

Supports exporting to an mpv memeshader!

And now a Magpie effect!

Usage

The order of quality is 8x32 > 4x32 > 4x24 > 4x16 > 4x12 > 3x12 > 2x12 > fast > faster > veryfast. Conversely the order of speed would be the reverse.

The CuNNy-fast shader is the recommended shader if you’re on a slow machine.

Variants:

  • (No-suffix): Trained to be neutral and do no denoising or sharpening.
  • SOFT: Trained to anti-alias & produce a soft output. Is probably the most ‘artifact-free’ variant if you don’t count blur.
  • DS: Trained to denoise & sharpen.
  • NVL: Trained to upscale visual novel games & high-quality illustrations.

Standard model/backend combinations have been pre-generated in this repository. More versions of the models for different backends can be generated using the webapp: https://funnyplanter.github.io/

mpv

mpv shaders are found inside the mpv/ directory. Metric-focused variants are found inside the results/ directory. To activate, add glsl-shader="path/to/shader.glsl" to your mpv.conf.

There are versions of the mpv shaders use 8-bit dp4a instructions. They can be many times faster than the standard upscaling shader depending on if your hardware supports accelerated dp4a instructions. Requires vo=gpu-next with gpu-api=vulkan. They can be found inside the dp4a/ subdirectories.

Magpie

Magpie effects are found inside the magpie/ directory. To install, drag the files into the effects subfolder inside the root of your Magpie installation. Once installed you will be able to add the effect in the Scaling modes tab.

As CuNNy only upscales by a factor of 2x, if you are scaling a ratio between 1 and 2 (i.e. 720 -> 1080 [1.5x]) you will need to downscale after upscaling.

The choice of downscaler has a large effect on the resulting image quality and sharpness. A high-quality downscale effect is provided in this repository located inside the same magpie/ directory. Apply the downscale effect after the upscale effect.

Training

Tested training with PyTorch nightly on Linux with Python 3.11. If any errors arise try using nightly.

Create folders by running sh scripts/mkfolders.sh. Prepare data by running sh scripts/split.sh <input-folder> <output-128-grids>, then py scripts/proc.py <128-grids> <out>.

To train py train.py <data> <N> <D> where N is the number of internal convolutions and D is the number of feature layers.

Convert the resulting model to an mpv shader by running py mpv.py <models/model.pickle>.

Convert the resulting model to a Magpie effect by running py magpie.py <models/model.pickle>.

Trains very fast on my machine.

Quality

See results/.

License

LGPL v3

评论

暂无评论