You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I extracted vsViewer into the I:\VapourSynth-folder and opened the following script:
# Imports
import vapoursynth as vs
core = vs.get_core()
clip = core.std.BlankClip(format=vs.RGB24, color=[0, 0, 0])
clip = core.sub.Subtitle(clip, core.version())
clip.set_output()
It properly showed the Vapoursynth version (Core R53, API R3.6) etc.
7. I then created the folders I:\VapourSynth\Scripts and I:\VapourSynth\Lib\site-packages
8. I then adjusted the I:\VapourSynth\python39._pth to:
Scripts
Lib\site-packages
python39.zip
.
# Uncomment to run site.main() automatically
#import site
I opened a command line promp in I:\VapourSynth an called:
Collecting pip
Downloading pip-21.1.2-py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 3.2 MB/s
Collecting setuptools
Downloading setuptools-57.0.0-py3-none-any.whl (821 kB)
|████████████████████████████████| 821 kB 6.4 MB/s
Collecting wheel
Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
WARNING: The script wheel.exe is installed in 'i:\Vapoursynth\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'i:\Vapoursynth\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-21.1.2 setuptools-57.0.0 wheel-0.36.2
i:\Vapoursynth\python.exe -m pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.8.1+cu111
Downloading https://download.pytorch.org/whl/cu111/torch-1.8.1%2Bcu111-cp39-cp39-win_amd64.whl (3055.6 MB)
|████████████████████████████████| 3055.6 MB 11 kB/s
Collecting torchvision==0.9.1+cu111
Downloading https://download.pytorch.org/whl/cu111/torchvision-0.9.1%2Bcu111-cp39-cp39-win_amd64.whl (1.9 MB)
|████████████████████████████████| 1.9 MB 6.8 MB/s
Collecting torchaudio===0.8.1
Downloading torchaudio-0.8.1-cp39-none-win_amd64.whl (109 kB)
|████████████████████████████████| 109 kB 2.2 MB/s
Collecting typing-extensions
Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
Collecting numpy
Downloading numpy-1.20.3-cp39-cp39-win_amd64.whl (13.7 MB)
|████████████████████████████████| 13.7 MB 6.4 MB/s
Collecting pillow>=4.1.1
Downloading Pillow-8.2.0-cp39-cp39-win_amd64.whl (2.2 MB)
|████████████████████████████████| 2.2 MB ...
Installing collected packages: typing-extensions, numpy, torch, pillow, torchvision, torchaudio
WARNING: The script f2py.exe is installed in 'i:\Vapoursynth\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts convert-caffe2-to-onnx.exe and convert-onnx-to-caffe2.exe are installed in 'i:\Vapoursynth\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.20.3 pillow-8.2.0 torch-1.8.1+cu111 torchaudio-0.8.1 torchvision-0.9.1+cu111 typing-extensions-3.10.0.0
Script evaluation failed:
Python exception: cannot import name 'VSGAN' from 'vsgan' (i:\Vapoursynth\Lib\site-packages\vsgan\__init__.py)
Traceback (most recent call last):
File "src\cython\vapoursynth.pyx", line 2242, in vapoursynth.vpy_evaluateScript
File "src\cython\vapoursynth.pyx", line 2243, in vapoursynth.vpy_evaluateScript
File "C:\Users\Selur\Desktop\testvsgan.vpy", line 26, in <module>
from vsgan import VSGAN
ImportError: cannot import name 'VSGAN' from 'vsgan' (i:\Vapoursynth\Lib\site-packages\vsgan\__init__.py)
Without the
from vsgan import VSGAN
vsgan = VSGAN("cuda")
model = "I:/Hybrid/64bit/vsgan_models/4x_BSRGAN.pth"
vsgan.load_model(model)
clip = vsgan.run(clip=clip)
part in the script the script is processed properly.
Does anyone have an idea what might cause this problem?
Cu Selur
The text was updated successfully, but these errors were encountered:
If you install VSGAN and it errors out during installation, the resulting install tends to be a "ghost" installation of some kind. When in this state, the error cannot import name 'VSGAN' from 'vsgan' is common.
The VapourSynth python package is having a problem finding the VapourSynth C library since it's a portable install.
Based on the pypi/VapourSynth setup.py file it looks like it's trying to find dll files and registry keys. I would look into this first.
Just now I also spotted a project VapourSynth-portable by the same guys behind the original. I have no idea the difference.
Thanks for the hint! By creating a fake I:\Vapoursynth\Lib\site-packages\VapourSynth-53.dist-info folder with some fake info and uninstalling and reinstalling VSGAN I got it working! :)
That's great news. I wish there was a more concrete way to fix it via pip requirements or something though :/ VapourSynth in relation to pip/pypi has been in a dodgy state for quite a while in my opinion. Even the PyPI VapourSynth projects are out of date (by 2 versions atm).
Here's what I did:
I:\VapourSynth
I:\VapourSynth
I:\VapourSynth
-folder and opened the following script:It properly showed the Vapoursynth version (Core R53, API R3.6) etc.
7. I then created the folders
I:\VapourSynth\Scripts
andI:\VapourSynth\Lib\site-packages
8. I then adjusted the I:\VapourSynth\python39._pth to:
I:\VapourSynth
an called:and then called
to install pip, which returned:
to check that this worked. Which returned:
which gave me:
[*]I then called:
which gave me:
which gave me:
Without the
part in the script the script is processed properly.
Does anyone have an idea what might cause this problem?
Cu Selur
The text was updated successfully, but these errors were encountered: