Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful run on Windows #4

Open
justinjohn0306 opened this issue Jan 14, 2025 · 7 comments
Open

Successful run on Windows #4

justinjohn0306 opened this issue Jan 14, 2025 · 7 comments

Comments

@justinjohn0306
Copy link

I altered a couple of files and made it work on a windows machine with RTX 3090, works great 👍

So uh...not really an issue but something to let the author know :)

image
@justinjohn0306 justinjohn0306 changed the title Sucessfull run on Windows Successful run on Windows Jan 14, 2025
@digital-avatar
Copy link
Collaborator

Thank you for your feedback and for taking the time to modify the files to make it work on your Windows machine! It's great to hear that it's working well for you.

We would love to encourage you to share your updates or any improvements you’ve made. Collaborative contributions help enhance the project and can benefit other users as well. If you’re interested, consider submitting a pull request or sharing your changes with us!

Together, we can make this project even better. Looking forward to your input!

@nitinmukesh
Copy link

@justinjohn0306

Please could you share pip freeze

@justinjohn0306
Copy link
Author

@digital-avatar here's my fork for windows: https://github.com/justinjohn0306/ditto-talkinghead-windows
tested with cuda 12.1 and tensorrt 8.6.1.6

@nitinmukesh
Copy link

nitinmukesh commented Jan 16, 2025

@justinjohn0306

I am using your repo. How did you install tensorrt 8.6.1.6?

(ditto) C:\aitest\ditto-talkinghead-windows>pip install tensorrt==8.6.1.6
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
ERROR: Ignored the following yanked versions: 0.0.1
ERROR: Could not find a version that satisfies the requirement tensorrt==8.6.1.6 (from versions: 0.0.1.dev5, 8.6.1, 8.6.1.post1, 9.0.0.post11.dev1, 9.0.0.post12.dev1, 9.0.1.post11.dev4, 9.0.1.post12.dev4, 9.1.0.post11.dev4, 9.1.0.post12.dev4, 9.2.0.post11.dev5, 9.2.0.post12.dev5, 9.3.0.post11.dev1, 9.3.0.post12.dev1, 10.0.0b6, 10.0.1, 10.1.0, 10.2.0, 10.2.0.post1, 10.3.0, 10.4.0, 10.5.0, 10.6.0, 10.6.0.post1, 10.7.0)
ERROR: No matching distribution found for tensorrt==8.6.1.6

@zacharynapier
Copy link

@justinjohn0306

I am using your repo. How did you install tensorrt 8.6.1.6?

(ditto) C:\aitest\ditto-talkinghead-windows>pip install tensorrt==8.6.1.6
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
ERROR: Ignored the following yanked versions: 0.0.1
ERROR: Could not find a version that satisfies the requirement tensorrt==8.6.1.6 (from versions: 0.0.1.dev5, 8.6.1, 8.6.1.post1, 9.0.0.post11.dev1, 9.0.0.post12.dev1, 9.0.1.post11.dev4, 9.0.1.post12.dev4, 9.1.0.post11.dev4, 9.1.0.post12.dev4, 9.2.0.post11.dev5, 9.2.0.post12.dev5, 9.3.0.post11.dev1, 9.3.0.post12.dev1, 10.0.0b6, 10.0.1, 10.1.0, 10.2.0, 10.2.0.post1, 10.3.0, 10.4.0, 10.5.0, 10.6.0, 10.6.0.post1, 10.7.0)
ERROR: No matching distribution found for tensorrt==8.6.1.6

For me I installed TensorRT 8.6.1.6 for Windows with CUDA 12.X by doing the following:

  1. Download TensorRT from the NVIDIA Developer portal

    • You'll need to create an NVIDIA Developer account if you don't have one
    • Accept the Terms & Conditions when prompted to view downloadable files
    • Download the ZIP file for CUDA 12.1
  2. After downloading:

    • Unzip
    • Navigate to TensorRT-8.6.1.6\python
    • Install the Python wheel:
      pip install tensorrt-8.6.1-cp310-none-win_amd64.whl
      
  3. Copy DLL files:

    • Navigate to TensorRT-8.6.1.6\lib
    • Copy all .dll files
    • Paste into C:\Users\<username>\anaconda3\envs\ditto\Library\bin or C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin

@zacharynapier
Copy link

Also to get the Windows version working I had to go to .\core\utils\tensorrt_utils.py:

Existing lines:

logger = trt.Logger(trt.Logger.ERROR)
trt.init_libnvinfer_plugins(logger, "")

And add the following lines immediately below:

PLUGIN_PATH = os.path.join(
    os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
    "checkpoints",
    "plugins",
    "grid_sample_3d_plugin.dll"
)

if os.path.exists(PLUGIN_PATH):
    ctypes.CDLL(PLUGIN_PATH)

Great work @justinjohn0306 and @digital-avatar!

Image

@justinjohn0306
Copy link
Author

Also to get the Windows version working I had to go to .\core\utils\tensorrt_utils.py:

Existing lines:

logger = trt.Logger(trt.Logger.ERROR)
trt.init_libnvinfer_plugins(logger, "")

And add the following lines immediately below:

PLUGIN_PATH = os.path.join(
    os.path.dirname(os.path.dirname(os.path.dirname(__file__))),
    "checkpoints",
    "plugins",
    "grid_sample_3d_plugin.dll"
)

if os.path.exists(PLUGIN_PATH):
    ctypes.CDLL(PLUGIN_PATH)

Great work @justinjohn0306 and @digital-avatar!

Image

oops, I forgot to upload this file, mb - just updated it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants