AlphaAtlas / VapourSynth-Super-Resolution-Helper

Setup scripts for ESRGAN/MXNet image/video upscaling in VapourSynth
MIT License
75 stars 3 forks source link

Nvidia Testers #4

Closed AlphaAtlas closed 4 years ago

AlphaAtlas commented 4 years ago

As of this post, I'm about 400 miles away from my desktop with a 980 TI, so I'll need some sacrifices brave souls with Nvidia video cards for testing at some point.

theChaosCoder commented 4 years ago

How do I start? I have a GTX 1070 Tried _install_and_update_everything.bat but _update_plugins_scripts_vsrepo.bat does not exist. Called .\SetupScripts.py -m but get an import error (after installing pySmartDL)

 from .InstallCUDA import check_cuda, check_cudnn
ModuleNotFoundError: No module named '__main__.InstallCUDA'; '__main__' is not a package
AlphaAtlas commented 4 years ago

I wasn't expecting a fast response! It's not ready yet, give me a day or two :P

The readme isn't updated either, but basically, there will be a PyInstaller created .exe that downloads your fatpack, and a bunch of other finicky stuff needed to get WolframRhodium's (amazing) upscaling models easily accessible in VSEdit, in one click, without any prerequisites. The "not ready" part is because everything's getting moved from batch files to Python.

Do you have any version of CUDA or cuDNN installed? It's fine if you do, as the installer is supposed to check for that.

AlphaAtlas commented 4 years ago

Pushed a release! Just click the .exe, and post what errors it spits out. They should show up in the console.

theChaosCoder commented 4 years ago

There is no exe in 0.1 I pulled the current master and ran the FatDownloader build. After that FatDownloader.exe showed me this message.

Do you want to continue? [Y/N]Y
b'Name                     \r\r\nNVIDIA GeForce GTX 1070  \r\r\n\r\r\n'
Traceback (most recent call last):
  File "FatDownloader.py", line 149, in <module>
  File "FatDownloader.py", line 135, in get_gpu_vendor
Exception: Error finding active graphics card manufacturer!
[11040] Failed to execute script FatDownloader

EDIT you should compare the gpu string like that: if "nvidia" in line.lower():

theChaosCoder commented 4 years ago

The rest of the script seem to run fine.

AlphaAtlas commented 4 years ago

Fixed, thanks!

What happens if you run _select_neural_network.bat? In theory, it's supposed to read models from WolframRhodium's repository, selectively pull the model folder you pick with SVN, and then copy those arguments into any .vpy script in the "VapourSynthScripts" folder than ends in "Auto".

And, assuming that works, does the super-resolution function work in either of those scripts? The image processing script needs a folder with images in it, and the video one is just a regular VapourSynth script. You can either uncomment out the plugin import, bit depth conversion and super_resolution lines, or you can just run the installer in a different folder to get the updated scripts (which shouldn't take long, as it can use cached downloads). I'm still trying to test this out myself, but I can't get Kice's MXNet plugin to run on the CPU :(

theChaosCoder commented 4 years ago

_select_neural_network.bat seems to work, it downloaded my selected model.

But there are still some errors in the script: Line 27 in ExampleAuto.py should be clip = core.imwri.Read(r"Samples/texture.dds") the next error is

clip = avsfunc.OpenCV_Detail(clip, strength = 50)
NameError: name 'avsfunc' is not defined

Why don't you put vs_mxnet.dll in the vs plugins?

AlphaAtlas commented 4 years ago

Back when I was testing with a Nvidia card last year, the vs mxnet.dll never loaded for me unless it was in its own directory. Whenever VS tried to load it from the plugin folder first, I'd always get some kind of error, even if I tried to import it with "altPath=True" afterwards... But if it works in the plugin folder now, that's good :)

So what that image script does is look at the directory path at the top, globs that, and generates a clip based on all the images it finds in that directory using IMWRI. You can either filter it by a single image, where it tries to match all other images of that type, or by a file extension, where it grabs everything and groups them into clips with matching formats. All the actual vapoursynth functions HAVE to be inside either one of the defs... Basically, I need to write a wiki page for that script.

If you have a test video, "ProcessVideoAuto.vpy" is just a regular vapoursynth script, so that should just work (tm).

So if you wanted to use the .dds test image, you'd set the path to "{Whatever folder the fatpack is in}\VapourSynth64Portable\VapourSynthScripts\Samples", change the filetype to dds, and set the filter mode to "filetype"

I just pulled the test repo, and that little OpenCV wrapper works for me... I'll reinstall and try it again.

AlphaAtlas commented 4 years ago

I think I just need to test the installer myself, when I get access to a Nvidia GPU again.