Alexkral / AviSynthAiUpscale

An AviSynth+ implementation of some Super-Resolution Convolutional Neural Networks.
GNU General Public License v3.0
133 stars 2 forks source link

Script error: There is no function named 'ConvertToShader' #6

Closed ngecmods closed 3 years ago

ngecmods commented 3 years ago

I am trying to use the AiUpscale plugin and have problems!

Software: Windows 10 Pro - x86-64 Avisynth+ 3.7.0 (None Standard Directory - C:\Users\edit1\AviSynth+) AviSynthShader 1.6.6 AviSynth AiUpscale v1.2.0

Error Script error: There is no function named 'ConvertToShader' (C:/Users/edit1/AviSynth+/plugins64+/AiUpscale.avsi, line 230) (C:/Users/edit1/AviSynth+/plugins64+/AiUpscale.avsi, line 232) (C:/Users/edit1/AviSynth+/plugins64+/AiUpscale.avsi, line 146) (C:/Users/edit1/AviSynth+/plugins64+/AiUpscale.avsi, line 147)

Have I missed something?

Alexkral commented 3 years ago

Hi, that error is because AviSynth Shader is missing. Check out this post:

https://forum.doom9.org/showthread.php?p=1922079#post1922079

ngecmods commented 3 years ago

Hi,

Thanks for the update.

I did install AviSynthShader 1.6.6

Extracted AviSynthShader 1.6.6 and copied Shader.avsi and Shader-x64.dll to C:\Users\edit1\AviSynth+\plugins64+

ngecmods commented 3 years ago

Having dug around and debugged the issue I have found the following issue / solution.

Cannot load file 'C:/Program Files (x86)/AviSynth+/plugins64+/Shader-x64.dll'. Platform returned code 126: The specified module could not be found.

Dependencies that could not be loaded: d3dx9_43.dll

The issue is with AviSynthShader v1.6.6.

On a Windows 10 (x64) (Build 19043) box it is an problem with DirectX 12

SOLUTION Install DirectX End-User Runtime Web Installer https://www.microsoft.com/en-gb/download/details.aspx?id=35

This cures the problem

Q/ How would I tell AiUpscale() to upscale a PAL 720x576 avi to 1280x720 please?

Many thanks for a great plugin

Alexkral commented 3 years ago

I'm glad you solved the problem, I had forgotten that I also had to install DirectX at some point.

How would I tell AiUpscale() to upscale a PAL 720x576 avi to 1280x720 please?

I think I'd clip it to 704X576 first if you see black borders on the sides. Then I'd double the resolution with AiUpscale, and resize it to 960X720 (to 984x720 if you didn't clip it).

I'm not sure if you will get a noticeable improvement over directly resizing with some interpolation method. Try a Sharp model and something like Catrom for downscaling.

ngecmods commented 3 years ago

Many thanks for the update - it's appreciated.

How would I tell AiUpscale to upscale to 960X720 ie,

AiUpscale(width=960, height=720)

I just cannot find any script commands to achieve the above

Sorry for so many questions here.

Alexkral commented 3 years ago

That is not possible with v1.2.0, you can use v1.1.0 for that:

AiUpscale (Luma = "VDSR", Width = 960, Height = 720)

This will be very sharp. Note that the "LineArt" models are called "Illustration" in that version.

ngecmods commented 3 years ago

Brilliant - thank you so much for your kind help and time.

All the best

PS I would have posted in doom9.org but I'm a new member and cannot post for 5 days!!!