Skip to main content

waifu2x-ncnn-vulkan-python

  • This is modified waifu2x-ncnn-vulkan, Export pyd and so files to Python
  • Support Linux, Windows, MacOs
  • Support import JPG, PNG, BMP, GIF, WEBP, Animated WEBP, APNG
  • Support export JPG, PNG, BMP, WEBP, Animated WEBP, APNG
  • Support vulkan gpu and cpu

Install

pip install waifu2x-vulkan

Use

from waifu2x_vulkan import waifu2x_vulkan

# init
sts = waifu2x_vulkan.init()
print("init, code:{}".format(str(sts)))
isCpuModel = False
if sts < 0:
    # cpu model
    isCpuModel = True

gpuList = waifu2x_vulkan.getGpuInfo()
print(gpuList)
sts = waifu2x_vulkan.initSet(gpuId=0)
print("init set, code:{}".format(str(sts)))

# Model List:
#'MODEL_ANIME_STYLE_ART_RGB_NOISE0', 'MODEL_ANIME_STYLE_ART_RGB_NOISE0_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NOISE1', 'MODEL_ANIME_STYLE_ART_RGB_NOISE1_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NOISE2', 'MODEL_ANIME_STYLE_ART_RGB_NOISE2_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NOISE3', 'MODEL_ANIME_STYLE_ART_RGB_NOISE3_TTA', 'MODEL_ANIME_STYLE_ART_RGB_NO_NOISE', 'MODEL_ANIME_STYLE_ART_RGB_NO_NOISE_TTA', 'MODEL_CUNET_NOISE0', 'MODEL_CUNET_NOISE0_TTA', 'MODEL_CUNET_NOISE1', 'MODEL_CUNET_NOISE1_TTA', 'MODEL_CUNET_NOISE2', 'MODEL_CUNET_NOISE2_TTA', 'MODEL_CUNET_NOISE3', 'MODEL_CUNET_NOISE3_TTA', 'MODEL_CUNET_NO_NOISE', 'MODEL_CUNET_NO_NOISE_TTA', 'MODEL_CUNET_NO_SCALE_NOISE0', 'MODEL_CUNET_NO_SCALE_NOISE0_TTA', 'MODEL_CUNET_NO_SCALE_NOISE1', 'MODEL_CUNET_NO_SCALE_NOISE1_TTA', 'MODEL_CUNET_NO_SCALE_NOISE2', 'MODEL_CUNET_NO_SCALE_NOISE2_TTA', 'MODEL_CUNET_NO_SCALE_NOISE3', 'MODEL_CUNET_NO_SCALE_NOISE3_TTA', 'MODEL_CUNET_NO_SCALE_NO_NOISE', 'MODEL_CUNET_NO_SCALE_NO_NOISE_TTA', 'MODEL_PHOTO_NOISE0', 'MODEL_PHOTO_NOISE0_TTA', 'MODEL_PHOTO_NOISE1', 'MODEL_PHOTO_NOISE1_TTA', 'MODEL_PHOTO_NOISE2', 'MODEL_PHOTO_NOISE2_TTA', 'MODEL_PHOTO_NOISE3', 'MODEL_PHOTO_NOISE3_TTA', 'MODEL_PHOTO_NO_NOISE', 'MODEL_PHOTO_NO_NOISE_TTA'

# add picture ...
# waifu2x.add(data=imgData, modelIndex=waifu2x_vulkan.MODEL_ANIME_STYLE_ART_RGB_NOISE0, backId=0, scale=2.5)
# waifu2x.add(data=imgData, modelIndex=waifu2x_vulkan.MODEL_ANIME_STYLE_ART_RGB_NOISE0, backId=0, format="webp", width=1000, high=1000)

# load picture...
# newData, format, backId, tick = waifu2x.load(0)

Metadata

Release files for waifu2x-vulkan 1.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waifu2x-vulkan 1.1.6
File Size Uploaded
waifu2x-vulkan-1.1.6.tar.gz 63.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for waifu2x-vulkan 1.1.6
File Interpreter ABI Platform
waifu2x_vulkan-1.1.6-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl CPython 3.8, CPython 3.6, CPython 3.10, CPython 3.9, CPython 3.7 none Windows x86-64 Details

Total release size: 98.9 MB

Release files / waifu2x-vulkan-1.1.6.tar.gz

Download URL waifu2x-vulkan-1.1.6.tar.gz
Size 63.6 MB
Tags Source
SHA-256 checksum
How to use checksums
f01dedd3d029d4572173c4e7f41604c302be682ac2fb5a9dbf1396f7b26687ba
BLAKE2b-256 checksum
How to use checksums
bc7b6e8c0cad63bd1516735d8f512979e3a56ebe0bb24ad7df9982fbef2e6e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.9

Release files / waifu2x_vulkan-1.1.6-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl

Download URL waifu2x_vulkan-1.1.6-cp36.cp37.cp38.cp39.cp310-none-win_amd64.whl
Size 35.4 MB
Tags CPython 3.10 CPython 3.6 CPython 3.7 CPython 3.8 CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
87121c582ce3e33c4f87ccab63589b3d8aa0bf537b7452d06fb21c74d0de9e1c
BLAKE2b-256 checksum
How to use checksums
b12cf61fba7c0888e3e3c1786c625fd852cd0c808756ef8a139e2a8251fcff92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.9

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

1 release file

1.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page