From Avisynth wiki
Jump to: navigation, search
Author Asd-g
Version 1.0.1
Download w2xncnnvk-
Category Resizers
License MIT


[edit] Description

w2xncnnvk is a ncnn implementation of waifu2x converter, based on waifu2x-ncnn-vulkan.

This is a port of the VapourSynth plugin w2xncnnvk.Waifu2x.

[edit] Requirements

  • Vulkan compatible device
  • AviSynth+ r3682 (can be downloaded from here until official release is uploaded) or later
  • Microsoft VisualC++ Redistributable Package 2022 (can be downloaded from here)
  • Supported color formats: RGBPS
  • models must be located in the same folder as w2xncnnvk.

[edit] Syntax and Parameters

w2xncnnvk (clip input, int "noise", int "scale", int "tile_w", int "tile_h", int "model", int "gpu_id", int "gpu_thread", bool "tta", bool "fp32", bool "list_gpu")

clip  input =
A clip to process.
It must be in RGB 32-bit planar format.

int  noise = 0
Denoise level.
Large value means strong denoise effect, -1 - no effect.
Must be between -1..3.
Default: 0.

int  scale = 2
Upscale ratio.
Must be either 1 or 2.
Default: 2.

int  tile_w = input_width
int  tile_h = input_height
Tile width and height, respectively.
Use smaller value to reduce GPU memory usage.
Must be equal to or greater than 32.
Default: input_width, input_height.

int  model = 2
Model to use.
  • 0: upconv_7_anime_style_art_rgb
  • 1: upconv_7_photo
  • 2: cunet
Default: 2.

int  gpu_id =
GPU device to use.
By default the default device is selected.

int  gpu_thread = 2
Thread count for upscaling.
Using larger values may increase GPU usage and consume more GPU memory. If you find that your GPU is hungry, try increasing thread count to achieve faster processing.
Default: 2.

bool  tta = false
Enable TTA(Test-Time Augmentation) mode.
Default: False.

bool  fp32 = false
Enable FP32 mode.
Default: False.

bool  list_gpu = false
Simply print a list of available GPU devices on the frame and does nothing else.
Default: False.

[edit] Examples

w2xncnnvk with default settings:

w2xncnnvk(noise=0, scale=2, model=2, gpu_thread=2, tta=false, fp32=false, list_gpu=false)

[edit] Changelog

Version      Date            Changes
v1.0.1 2022/09/12 - Fixed undefined behavior when upstream throw runtime error. - Updated boost 1.80.0. - Updated Vulkan SDK
v1.0.0 2022/08/17 - Initial release.

[edit] External Links

  • GitHub - Source code repository.

Back to External Filters

Personal tools