I set up my Vapoursynth folder a new, wanting to have an overview of what needs to be installed.
Quote:To work this filter, you should find in Lib\site-packages
the files: spatial_correlation_sampler_backend.cp312-win_amd64.pyd, spatial_correlation_sampler_backend.py
and the folders: spatial_correlation_sampler, spatial_correlation_sampler-0.5.0.dist-info
moreover in Lib\site-packages\__pycache__
you should find spatial_correlation_sampler_backend.cpython-312.pyc
As far as I can see, the files are all there.
I redownloaded spatial_correlation_sampler-0.5.0-py312-cp312-win_amd64.whl.zip and extracted it into Vapoursynth/Lib/site-packages to be sure.
Do you know that dll the error is referring to?
Using my old Vapoursynth folder, it works, but in my new one something is amiss.
Uploaded the new folder to my 'experimental'-folder as 'Vapoursynth_testing-7z' no clue what is amiss.
Do you see anything missing?
I tested your environment, and I get the same error:
File "D:\SYNC\Software\Hybrid\Torch\testing\Vapoursynth\Lib\site-packages\spatial_correlation_sampler\spatial_correlation_sampler.py", line 6, in <module>
import spatial_correlation_sampler_backend as correlation
ImportError: DLL load failed while importing spatial_correlation_sampler_backend: Impossibile trovare la procedura specificata.
more precisely from spatial_correlation_sampler_backend.py that has this code
def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkg_resources, importlib.util
__file__ = pkg_resources.resource_filename(__name__, 'spatial_correlation_sampler_backend.cp312-win_amd64.pyd')
__loader__ = None; del __bootstrap__, __loader__
spec = importlib.util.spec_from_file_location(__name__,__file__)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
__bootstrap__()
'spatial_correlation_sampler_backend.cp312-win_amd64.pyd' is the DLL not found, but is available.
try to downgrade to importlib 7.10
debugging this kind of errors in python is almost impossible.
What is strange is that on my side the DLL is found.
I deleted the file spatial_correlation_sampler_backend.cpython-312.pyc in Lib\site-packages\__pycache__
But the filter is working fine, it seems that this file is not necessary to load the DLL.
In the case it could be useful I attached a comparison on the difference between my env and your testing env (obtained using WinMerge).
In the report are included only the files or folders that are different, and are a lot !
Given that your new environment is very different.
My suggestion is to start with the last working environment (including python version).
Upgrade a package a time (starting from python) till you will find the incompatible package.
2024-09-26 13:56:24.416 Script was successfully evaluated. Output video info:
Frames: 3907 | Time: 0:02:10.364 | Size: 2560x720 | FPS: 30000/1001 = 29.97 | Format: YUV420P8 2024-09-26 13:56:24.587 Qt warning: QPixmap:caled: Pixmap is a null pixmap 2024-09-26 13:56:31.554 [VSE Server]: incoming connection [VSE Server]: ConnectedState [VSE Server]: socket is ready to be read [VSE Server]: connection open: true [VSE Server]: connection readable: true [VSE Server] - Message received: changeTo ### C:\Users\SOS\AppData\Local\Temp\tempPreviewVapoursynthFile13_56_31_542.vpy ### 2024-09-26 13:56:41.086 C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\kornia\feature\lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
@torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\kornia\feature\lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
@torch.cuda.amp.custom_fwd(cast_inputs=torch.float32) C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\deepex\models\vgg19_gray.py:130: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/...ted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
model.load_state_dict(torch.load(vgg19_gray_path)) C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\deepex\models\vgg19_gray.py:130: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/...ted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
model.load_state_dict(torch.load(vgg19_gray_path)) 2024-09-26 13:56:45.936 Failed to evaluate the script:
Python exception: DLL load failed while importing spatial_correlation_sampler_backend: The specified procedure could not be found.
Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
File "src\\cython\\vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
File "C:\Users\SOS\AppData\Local\Temp\tempPreviewVapoursynthFile13_56_31_542.vpy", line 43, in
clip = HAVC_deepex(clip=clip, method=3, ref_merge=0, dark=True, smooth=True, sc_framedir="C:/Users/SOS/Videos/CyberLink/ok", ex_model=0, max_memory_frames=0, encode_mode=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\__init__.py", line 574, in HAVC_deepex
clip_colored = vs_colormnet(clip, clip_ref, image_size=-1, enable_resize=enable_resize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\vsslib\vsmodels.py", line 37, in vs_colormnet
return vs_colormnet_batch(clip, clip_ref, image_size, enable_resize, frame_propagate, max_memory_frames)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\colormnet\__init__.py", line 199, in vs_colormnet_batch
colorizer = colormnet_colorizer(image_size=image_size, vid_length=vid_length, enable_resize=enable_resize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\colormnet\__init__.py", line 45, in colormnet_colorizer
return ColorMNetRender(image_size=image_size, vid_length=vid_length, enable_resize=enable_resize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\colormnet\colormnet_render.py", line 83, in __init__
self._colorize_init(image_size, vid_length, propagate)
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\colormnet\colormnet_render.py", line 137, in _colorize_init
self.network = ColorMNet(self.config, self.config['model']).cuda().eval()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\colormnet\model\network.py", line 37, in __init__
self.short_term_attn = LocalGatedPropagation(d_qk=64, # 256
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsdeoldify\colormnet\model\attention.py", line 763, in __init__
from spatial_correlation_sampler import SpatialCorrelationSampler
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\spatial_correlation_sampler\__init__.py", line 1, in
from .spatial_correlation_sampler import SpatialCorrelationSampler, spatial_correlation_sample
File "C:\Program Files\Hybrid\64bit\Vapoursynth\Lib\site-packages\spatial_correlation_sampler\spatial_correlation_sampler.py", line 6, in
import spatial_correlation_sampler_backend as correlation
ImportError: DLL load failed while importing spatial_correlation_sampler_backend: The specified procedure could not be found.
* left out gsmfss since it breaks stuff:
* `python -m pip install -U vsgmfss-fortuna`
=> Sadly, that does not help.
Since Hybrids last version is still on R68, it really is time to update.
Are the steps for vs-deoldify correct, or did I miss something.