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.

vs-animesr with Tensor RT 10.x
#1
Hello Selur,

  I completed the porting of "vs-animesr" to Tensor RT 10.x
  I attached the new wheel.

  Respect to the previous version I removed the parameters: nvfuser, cuda_graphs, trt_max_workspace_size
  and added the parameters: trt_debug, trt_workspace_size

  I also changed the default for parameter "model" from 0 to 1.

  See "__init__.py" for more details.

  With this porting the conversion to R68 of Hybrid is almost done. Smile

Dan


Attached Files
.zip   vsanimesr-1.1.0-py3-none-any.whl.zip (Size: 14,53 KB / Downloads: 23)
Reply
#2
Nice! Will try monday after work.

Cu Selur
Reply
#3
HolyWu, also released an update https://github.com/HolyWu/vs-animesr/releases, which now requires Torch-TensorRT 2.5.0.dev
But no clue atm. how to install it, since instead of the required 2.5.0.dev versions I only get 2.4.0.dev versions for torch and tensorrt. Angry
F:\Hybrid\64bit\Vapoursynth>python -m pip install --pre torch_tensorrt --index-url https://download.pytorch.org/whl/nightly/cu124
Looking in indexes: https://download.pytorch.org/whl/nightly/cu124
Requirement already satisfied: torch_tensorrt in f:\hybrid\64bit\vapoursynth\lib\site-packages (2.4.0.dev20240518+cu121)
Requirement already satisfied: torch<2.5.0,>=2.4.0.dev in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch_tensorrt) (2.4.0.dev20240523+cu121)
Requirement already satisfied: tensorrt<10.1.0,>=10.0.1 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch_tensorrt) (10.0.1)
Requirement already satisfied: packaging>=23 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch_tensorrt) (24.0)
Requirement already satisfied: numpy in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch_tensorrt) (1.26.4)
Requirement already satisfied: typing-extensions>=4.7.0 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch_tensorrt) (4.12.0)
Requirement already satisfied: tensorrt-cu12 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from tensorrt<10.1.0,>=10.0.1->torch_tensorrt) (10.0.1)
Requirement already satisfied: filelock in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (3.14.0)
Requirement already satisfied: sympy in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (1.12)
Requirement already satisfied: networkx in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (3.3)
Requirement already satisfied: jinja2 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (3.1.4)
Requirement already satisfied: fsspec in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (2024.5.0)
Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (2021.4.0)
Requirement already satisfied: intel-openmp==2021.* in f:\hybrid\64bit\vapoursynth\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (2021.4.0)
Requirement already satisfied: tbb==2021.* in f:\hybrid\64bit\vapoursynth\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (2021.12.0)
Requirement already satisfied: MarkupSafe>=2.0 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from jinja2->torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from sympy->torch<2.5.0,>=2.4.0.dev->torch_tensorrt) (1.3.0)

F:\Hybrid\64bit\Vapoursynth>python -m pip install tensorrt==10.0.1 tensorrt-cu12_bindings==10.0.1 tensorrt-cu12_libs==10.0.1 --extra-index-url https://pypi.nvidia.com
Looking in indexes: https://pypi.org/simple, https://pypi.nvidia.com
Requirement already satisfied: tensorrt==10.0.1 in f:\hybrid\64bit\vapoursynth\lib\site-packages (10.0.1)
Requirement already satisfied: tensorrt-cu12_bindings==10.0.1 in f:\hybrid\64bit\vapoursynth\lib\site-packages (10.0.1)
Requirement already satisfied: tensorrt-cu12_libs==10.0.1 in f:\hybrid\64bit\vapoursynth\lib\site-packages (10.0.1)
Requirement already satisfied: tensorrt-cu12 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from tensorrt==10.0.1) (10.0.1)
Requirement already satisfied: nvidia-cuda-runtime-cu12 in f:\hybrid\64bit\vapoursynth\lib\site-packages (from tensorrt-cu12_libs==10.0.1) (12.5.39)
=> DOH,... I did forget a '-U',... now it breaks torchvision.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.19.0.dev20240526+cu121 requires torch==2.4.0.dev20240523+cu121, but you have torch 2.5.0.dev20240708+cu124 which is incompatible.
so using:
python -m pip install -U --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu124
it installs torchvision 0.20.0.dev
=> seems like nothing got broken through this (but it seems like BasicVSR++ got a lot slower)

Cu Selur

Ps.: Vapoursynth R69 was released.
Reply
#4
last week I opened this issue to HolyWu: https://github.com/HolyWu/vs-animesr/issues/5

asking him to provide a new version of "vs-animesr" supporting Tensor RT 10.x.

I also provide him the code of my porting.

I don't know if he was already working on a new version, but 2 days ago he closed the issue and released the new version.

I tried to install the version 2.0.0 lowering the requirements.

But unfortunately it seems that this version is not working with the current Hybrid environment.

I get the following errors

Python exception: cannot import name 'set_layer_name' from 'torch_tensorrt.dynamo.conversion.converter_utils' (D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch_tensorrt\dynamo\conversion\converter_utils.py)

Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3365, in vapoursynth._vpy_evaluate
File "src\\cython\\vapoursynth.pyx", line 3366, in vapoursynth._vpy_evaluate
File "D:\PProjects\vs-animesr\tests\test_anime_AnimeSR_v2_TensoRT_fp16.vpy", line 34, in
from vsanimesr import animesr as AnimeSR
File "D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsanimesr\__init__.py", line 13, in
from .vsr_arch import MSRSWVSR
File "D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsanimesr\vsr_arch.py", line 5, in
from .interpolate import interpolate
File "D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\vsanimesr\interpolate.py", line 16, in
from torch_tensorrt.dynamo.conversion.converter_utils import enforce_tensor_types, set_layer_name
ImportError: cannot import name 'set_layer_name' from 'torch_tensorrt.dynamo.conversion.converter_utils' (D:\Programs\Hybrid\64bit\Vapoursynth\Lib\site-packages\torch_tensorrt\dynamo\conversion\converter_utils.py)

I think, that you can use my version, which is working with Hybrid, till you will be able to upgrade the Hybrid environment.

Dan
Reply
#5
I got both the latest vs-animesr and vs-rife working here.
I'll package and upload both and then upload them to my google drive in the experimental folder.
So you can try with those versions in ~2 hours. (packaging and uploading takes time)

Cu Selur
Reply
#6
Wow! I tested the version 2.0 of vs-animesr and HolyWu improved a lot the speed of this filter. 
On my PC I observed an increase of speed of about 210%, now is fast as "realesr animevideov3", but in my opinion "animesr" is a little better.

The speed of BasicVSR++ is almost the same, I don't have observed any slowdown.

Please note that in all the filters updated by HolyWu to Tensor RT 10.x, trt_max_workspace_size (max WSS) has been replaced by trt_workspace_size (with default=0) since in Tensor RT 10.x this option has been removed. You should update your GUI.

Dan
Reply
#7
I thought I did update the GUI,.... (the name, not the default value)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)