-
Notifications
You must be signed in to change notification settings - Fork 151
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
Error loading script: trt.py, ModuleNotFoundError: No module named 'tensorrt_bindings' #27
Comments
What appears to have worked for others. From your base SD webui folder: (E:\Stable diffusion\SD\webui\ in your case).
Open a command prompt and navigate to the base SD webui folder
Open a command prompt and navigate to the base SD webui folder
|
Thanks for the detailed steps, much appreciated. It worked!! |
Hi ! I've managed to get it to work with v1-5-pruned-emaonly.safetensors [6ce0161689], but when I try with sd_xl_base_1.0.safetensors [31e35c80fc], I get the following error (I created a profile for the sd_xl_base_1.0 tensors which I selected in the UI, and I'm using a shape that I generated in the profile) : ` (...)
actually, when I select the sdxl tensor in the UI, I get this error in the logs :
and the tensor isn't shown as selected. I have to select it twice for it to stick I relaunched the webui.bat and now I'm getting this error with sdxl base : |
Ok, si I simply switched to the dev branch and it worked right away ! |
Worked like a charm. |
I can't install tensorrt.It give me a error. note: This error originates from a subprocess, and is likely not a problem with pip. My pip is the newest.I don't know what's happen. |
Hi, my error is "different" |
*** Error loading script: trt.py What is "onnx_graphsurgeon"? I installe CUDA 11.8... on a 4060 16gb |
Is there a fix for the portable version, this won't work! |
Installing the latest nvidia drivers was the solution for me. |
Just run cmd in Administrator mode. |
HI racerx2oo3, |
there is no venv folder in portable version. I followed all steps but it does not install. Gets stuck in "onnx_graphsurgeon" step. Nvidia should fix it, this is a mess. |
Sinan,
Try this for the portable version.
in file explorer open your sd.webui folder >> open the webui folder
* In the extensions folder delete: stable-diffusion-webui-tensorrt
folder if it exists
Open a command prompt and navigate to our base SD webui folder: For the
portable version this would be: sd.webui
* From the command line run: environment.bat
* cd webui
* enter the following commands:
* * python.exe -m pip install --upgrade pip
* * python -m pip install nvidia-cudnn-cu11==8.9.4.25 --no-cache-dir
* * python -m pip install --pre --extra-index-url
https://pypi.nvidia.com/ tensorrt==9.0.1.post11.dev4 --no-cache-dir
* * python -m pip uninstall -y nvidia-cudnn-cu11
* webui.bat
* Install the TensorRT extension using the Install from URL option
* Once installed, go to the Extensions >> Installed tab and Apply and Restart
…On Wed, Oct 25, 2023 at 4:33 PM Sinan Dinç ***@***.***> wrote:
What appears to have worked for others.
From your base SD webui folder: (E:\Stable diffusion\SD\webui\ in your
case).
* In the extensions folder delete: stable-diffusion-webui-tensorrt folder if it exists
* Delete the venv folder
Open a command prompt and navigate to the base SD webui folder
* Run webui.bat - this should rebuild the virtual environment venv
* When the WebUI appears close it and close the command prompt
Open a command prompt and navigate to the base SD webui folder
* enter: venv\Scripts\activate.bat
* the command line should now have (venv) shown at the beginning.
* enter the following commands:
* * python.exe -m pip install --upgrade pip
* * python -m pip install nvidia-cudnn-cu11==8.9.4.25 --no-cache-dir
* * python -m pip install --pre --extra-index-url https://pypi.nvidia.com/ tensorrt==9.0.1.post11.dev4 --no-cache-dir
* * python -m pip uninstall -y nvidia-cudnn-cu11
* * venv\Scripts\deactivate.bat
* webui.bat
* Install the TensorRT extension using the Install from URL option
* Once installed, go to the Extensions >> Installed tab and Apply and Restart
there is no venv folder in portable version. I followed all steps but it
does not install. Gets stuck in "onnx_graphsurgeon" step. Nvidia should fix
it, this is a mess.
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANROKD3S7UNC2N5JKGHF2EDYBGOVRAVCNFSM6AAAAAA6EWWYWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQGE4TOMZYGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Closing duplicates + Seems to be resolved. |
I'm facing the same issue. I deleted the VENV dir and followed the proposed procedure, but the output remains the same
|
Greetings, I found this because I've tried multiple times to install this TRT extension while on a Linux OS (Ubuntu-based distro) with zero success. Each time I try to install via URL or from the extensions master list, the extension installation seems to hang, with an endless timer. I navigated to the My questions are: is this the same general issue as what is described in this issue thread? If so, can you provide the same guidance for Linux users? I don't believe that it's a problem with the I am supposing that if I go into the
commands, it could be fixed, but I am not sure at all. I also don't know the Linux equivalent to the Windows commands you mentioned before, i.e. Can you please help? |
I'm also on Ubuntu, found the issue and created a fix #225 Basically if you're stuck:
--- alternative, not recommend unless you know what you're doing Then you can either apply my fix 7c93523 to https://github.com/NVIDIA/Stable-Diffusion-WebUI-TensorRT/blob/main/install.py and run or using the A1111 SD UI install my repo instead https://github.com/andrewtvuong/Stable-Diffusion-WebUI-TensorRT as a temporary work around. Once the main package is fixed, I would uninstall and install the main again. |
If Nvidia is going to advertise this as a main feature of using their GPU, then they really need to take care of this. I'm reading 4 months worth of threads here all with the same issues everyone else seems to be hitting. Normally this type of troubleshooting crap wouldn't bother me, but this is from the company that I spent a lot stupid money on for their graphics card. This isn't just some Joe Blow repo, this is advertised on their snobby website, and at all over CSE 2024 That's what makes this so frustrating to me. Fix the doc, if you think it's good enough, you're an elitist snob and should be ashamed of yourself. ┻━┻ ︵ \( °□° )/ ︵ ┻━┻ "How to use |
+1 |
well for those who can't still make I made a full tutorial and also auto installers Double Your Stable Diffusion Inference Speed with RTX Acceleration TensorRT: A Comprehensive Guide |
Thank you! |
I tried to run this procedure several times, but it doesn't work fro me, I'm still getting this error: *** Error running install.py for extension F:\Stable-Diffusion\webui\extensions\Stable-Diffusion-WebUI-TensorRT. |
I followed the instructions and it worked. 100%. In my case, the fifth point of the instructions (venv\Scripts\deactivate.bat) did not work and/or was not found. I then skipped it (omitted it). Thanks for the precise instructions. Now I have the TensorRT tab in the UI. I previously set the arguments to default (deleted and kept backup). I have no idea if it has any meaning or use, but I also backed up the venv folder before deleting it. |
I use the [Stable-Diffusion-WebUI-TensorRT] branch master but get errors caused by dll error,but changed to controlnet_v2 branch get fix it |
For me issue
how to fixedclose Stable Diffusion Webui |
I have the same problem( |
This appears during installation:
This happens when starting the web UI:
|
see here: #286 |
My rude fix: #143 (comment) |
I stumbled upon this in 2024 and used the following commands in case the newer packages help today. Here are the commands I used: python.exe -m pip install --upgrade pip If you use version 10 of nvidia-cudnn-cu12, you will get an error when trying to use TensorRT later, so this uses the latest version of 9. You can also use the commands in the 2023 post above with the older packages. The older models worked, but I was getting the below errors after using the older packages, although TensorRT seemed to work: [E] 1: [myelinCache.cpp::nvinfer1::builder::MyelinAutotunerCache::deserialize::62] Error Code 1: Myelin (Myelin error from unknown graph) I do receive "[E] 4: The timing cache will not be used!" regardless of what packages I use. |
@peteer01 how did you solve this error
|
stumbled upon what you stumbled upon in December of 2024. the following steps helped me install Successfully installed tensorrt-9.3.0.post12.dev1 tensorrt_bindings-9.3.0.post12.dev1 tensorrt_libs-9.3.0.post12.dev1 have not confirmed if this solves my comfyUI issue with tensorrt...
|
Hello, i have fresh installed using installation method provided and the extension will install, but the tab for TensorRT will not show.
*** Error loading script: trt.py
Traceback (most recent call last):
File "E:\Stable diffusion\SD\webui\modules\scripts.py", line 382, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "E:\Stable diffusion\SD\webui\modules\script_loading.py", line 10, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "E:\Stable diffusion\SD\webui\extensions\Stable-Diffusion-WebUI-TensorRT\scripts\trt.py", line 10, in
import ui_trt
File "E:\Stable diffusion\SD\webui\extensions\Stable-Diffusion-WebUI-TensorRT\ui_trt.py", line 10, in
from exporter import export_onnx, export_trt
File "E:\Stable diffusion\SD\webui\extensions\Stable-Diffusion-WebUI-TensorRT\exporter.py", line 10, in
from utilities import Engine
File "E:\Stable diffusion\SD\webui\extensions\Stable-Diffusion-WebUI-TensorRT\utilities.py", line 32, in
import tensorrt as trt
File "E:\Stable diffusion\SD\webui\venv\lib\site-packages\tensorrt_init.py", line 18, in
from tensorrt_bindings import *
ModuleNotFoundError: No module named 'tensorrt_bindings'
The text was updated successfully, but these errors were encountered: