Closed suphamster closed 1 year ago
CPU version also not works very well:
-- Addon injected!
- Loading PyHook configuration if exists...
- Writing configuration to addon...
- Started processing...
Pipeline="[AI] DNN Super Resolution" was loaded with CPU support.
-- ERROR: Frame modification detected for multistage processing in frame=960! Frame skipped...
-- ERROR: Frame modification detected for multistage processing in frame=961! Frame skipped...
-- Connected process does not have addon loaded anymore. Exiting...
-- Check ReShade logs for more informations.
Others plugins simply don't work or crashes also:
-- ERROR: Unexpected error during load of pipeline="ai_cartoon_gan.py"
Traceback (most recent call last):
File "pyhook.py", line 250, in pyhook_main
File "pipeline.py", line 214, in load
File "D:\PyHook-1.3.0-win_amd64\pipelines\ai_cartoon_gan.py", line 145, in on_load
state_dict = torch.load(model_path)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 712, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 1049, in _load
result = unpickler.load()
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 1019, in persistent_load
load_tensor(dtype, nbytes, key, _maybe_decode_ascii(location))
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 1001, in load_tensor
wrap_storage=restore_location(storage, location),
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 175, in default_restore_location
result = fn(storage, location)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 152, in _cuda_deserialize
device = validate_cuda_device(location)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 136, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
-- ERROR: Unexpected error during load of pipeline="ai_style_transfer.py"
Traceback (most recent call last):
File "pyhook.py", line 250, in pyhook_main
File "pipeline.py", line 214, in load
File "D:\PyHook-1.3.0-win_amd64\pipelines\ai_style_transfer.py", line 140, in on_load
state_dict = torch.load(model_path)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 930, in _legacy_load
result = unpickler.load()
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 876, in persistent_load
wrap_storage=restore_location(obj, location),
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 175, in default_restore_location
result = fn(storage, location)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 152, in _cuda_deserialize
device = validate_cuda_device(location)
File "G:\anaconda3\envs\pyhook64env\lib\site-packages\torch\serialization.py", line 136, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Pipeline="[Test] RGB" was loaded.
BEFORE: Settings change: Brightness = 0.5199999809265137.
AFTER: Settings change: Brightness = 0.5199999809265137.
Unhandled exception occurred.
Traceback (most recent call last):
File "pyhook.py", line 280, in pyhook_main
KeyError: 'autosave_settings_seconds'
On the 1st part:
I should totally freeze python version for OpenCV build script. You could rebuild your OpenCV with Python 3.10.6 by adding freezed version after env name while creation of virtual env.
conda create -y --name %envName% python=3.10.6 numpy
Also setting LOCAL_PYTHON_64 is legacy and path to local python can be set in PyHook settings.
On the 2nd part:
-- ERROR: Frame modification detected for multistage processing in frame=960! Frame skipped...
suggest that you have changed in-game resolution while processing frame somehow - maybe dynamic resolution is enabled? Please, provide additonal info about resolution set in game.
It seems like your PyTorch installation does not support CUDA which is possible as pip's latest PyTorch that support CUDA 11.0 is 1.7.1 and pipelines use newer code based on 1.12.1.
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False
For KeyError it looks like settings.json file is messed up:
Unhandled exception occurred. Traceback (most recent call last): File "pyhook.py", line 280, in pyhook_main KeyError: 'autosave_settings_seconds'
Please verify if you have "autosave_settings_seconds": 5
provided in settings.json file in directory with PyHook.exe or remove the file completly so PyHook could create new valid one.
To summarize:
Try to install CUDA 11.3, then setup virtual env with Python 3.10.6. Install valid PyTorch version with CUDA support inside your virtual env:
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
Closed due to inactivity.
Is it because of Python 3.11? It's not like I had abilty to choose Python version when following OpenCV+CUDA installation guide posted here. LOCAL_PYTHON_64 = G:\anaconda3\envs\opencv_build\python.exe. Anacoda's installed Python: