This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

dlib 19.24.99 with CUDA
#15
Setting up a new environment using:
* created 'Vapoursynth'-folder
* downloaded 'Windows embeddable package (64-bit)' from https://www.python.org/downloads/release/python-3126/
* extracted it into the 'Vapoursynth'-folder
* downloaded 'VapourSynth64-Portable-R70' from https://github.com/vapoursynth/vapoursynth/releases
* extracted it into the 'Vapoursynth'-folder
* finished Vapoursynth portable installation:
  * adjusted `python312._pth` by adding:
  ```
  Scripts
  Lib\site-packages
  ```
  * installed pip:
    * download get-pip.py from https://bootstrap.pypa.io/get-pip.py into the 'Vapoursynth'-folder
    * `python get-pip.py`
  * `python -m pip install wheel\VapourSynth-70-cp312-cp312-win_amd64.whl`
* install vsrife dependencies, by calling:
  *  `python -m pip install -U packaging setuptools wheel`
  *  `python -m pip install -U torch torchvision torch_tensorrt --index-url https://download.pytorch.org/whl/nightly/cu124 --extra-index-url https://pypi.nvidia.com` (without '--pre')
* installed CodeFormer by calling:
  * `python -m pip install dlib-19.24.93-cp312-cp312-win_amd64` (from https://forum.selur.net/attachment.php?aid=2532)
  * `python -m pip install vscodeformer-1.0.2-py3-none-any.whl` (from https://forum.selur.net/attachment.php?aid=2552)
  * `python -m vscodeformer`
Using dlib fails:
2024-09-29 07:34:56.868
F:\workspace\Hybrid\debug\64bit\Vapoursynth\Lib\site-packages\vscodeformer\__init__.py:98: 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/main/SECURITY.md#untrusted-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.
module.load_state_dict(torch.load(model_path, map_location="cpu")["params_ema"])

F:\workspace\Hybrid\debug\64bit\Vapoursynth\Lib\site-packages\vscodeformer\__init__.py:98: 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/main/SECURITY.md#untrusted-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.
module.load_state_dict(torch.load(model_path, map_location="cpu")["params_ema"])

2024-09-29 07:34:57.135
Failed to evaluate the script:
Python exception: cannot access local variable 'dlib' where it is not associated with a value

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 "J:\tmp\tempPreviewVapoursynthFile07_34_54_512.vpy", line 43, in
clip = CodeFormer(clip=clip, upscale=1, detector=1) # 640x352
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\workspace\Hybrid\debug\64bit\Vapoursynth\Lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "F:\workspace\Hybrid\debug\64bit\Vapoursynth\Lib\site-packages\vscodeformer\__init__.py", line 103, in codeformer
FaceRestoreHelper(upscale, det_model=detection_model, use_parse=True, device=device) for _ in range(num_streams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\workspace\Hybrid\debug\64bit\Vapoursynth\Lib\site-packages\vscodeformer\face_restoration_helper.py", line 113, in __init__
self.face_detector, self.shape_predictor_5 = self.init_dlib()
^^^^^^^^^^^^^^^^
File "F:\workspace\Hybrid\debug\64bit\Vapoursynth\Lib\site-packages\vscodeformer\face_restoration_helper.py", line 173, in init_dlib
face_detector = dlib.cnn_face_detection_model_v1(detection_path)
^^^^
UnboundLocalError: cannot access local variable 'dlib' where it is not associated with a value

Listing the installed packages using 'python -m pip list':
Package                  Version
------------------------ ------------------------
certifi                  2024.8.30
charset-normalizer       3.3.2
colorama                 0.4.6
dlib                     19.24.92
filelock                 3.13.1
fsspec                   2024.6.1
idna                     3.10
Jinja2                   3.1.4
MarkupSafe               2.1.5
mpmath                   1.3.0
networkx                 3.3
numpy                    1.26.4
nvidia-cuda-runtime-cu12 12.6.68
opencv-python            4.10.0.84
packaging                24.1
Pillow                   10.1.0
pip                      24.2
requests                 2.32.3
setuptools               75.1.0
sympy                    1.13.1
tensorrt-cu12            10.3.0
tensorrt-cu12_bindings   10.3.0
tensorrt-cu12_libs       10.3.0
torch                    2.6.0.dev20240928+cu124
torch_tensorrt           2.6.0.dev20240926+cu124
torchvision              0.20.0.dev20240928+cu124
tqdm                     4.66.5
typing_extensions        4.12.2
urllib3                  2.2.3
VapourSynth              70
vscodeformer             1.0.2
wheel                    0.44.0

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
dlib 19.24.99 with CUDA - by Dan64 - 01.06.2024, 13:52
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 14:08
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 14:58
RE: dlib 19.24.99 with CUDA - by Dan64 - 01.06.2024, 15:25
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 15:34
RE: dlib 19.24.99 with CUDA - by Dan64 - 01.06.2024, 15:52
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 16:03
RE: dlib 19.24.99 with CUDA - by Dan64 - 01.06.2024, 16:06
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 16:15
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 16:22
RE: dlib 19.24.99 with CUDA - by Dan64 - 01.06.2024, 16:35
RE: dlib 19.24.99 with CUDA - by Selur - 01.06.2024, 16:54
RE: dlib 19.24.99 with CUDA - by Dan64 - 03.06.2024, 21:56
RE: dlib 19.24.99 with CUDA - by Selur - 09.06.2024, 11:24
RE: dlib 19.24.99 with CUDA - by Selur - 29.09.2024, 07:41
RE: dlib 19.24.99 with CUDA - by Dan64 - 29.09.2024, 09:49
RE: dlib 19.24.99 with CUDA - by Selur - 29.09.2024, 09:53
RE: dlib 19.24.99 with CUDA - by Selur - 29.09.2024, 09:56
RE: dlib 19.24.99 with CUDA - by Selur - 01.10.2024, 20:16
RE: dlib 19.24.99 with CUDA - by Dan64 - 02.10.2024, 17:44
RE: dlib 19.24.99 with CUDA - by Selur - 03.10.2024, 07:27
RE: dlib 19.24.99 with CUDA - by Selur - 20.10.2024, 18:59

Forum Jump:


Users browsing this thread: 2 Guest(s)