-
Notifications
You must be signed in to change notification settings - Fork 278
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
added TensorRT #205
added TensorRT #205
Conversation
@contentis ahhh...... I think the repository is set to private |
there are some issues
|
@w-e-w Just wanted to let you know that the repo is public now, but apparently, you were faster :D Thank you for your input and the PRs; this is awesome!
Agreed, that's why I tried to set it in the installer, so it is a one-time call. If |
well, installer is not called one time, it also called on every restart by the launch.py and by the way, I still have trubble getting TRT to work on my PC earlier today, not sure why yet. |
It is common for extensions to be easier to use by adding relevant things to the quick settings but to modify the user’s custom settings is unnecessarily intrusive. |
I do agree in part, from my viewpoint it if we just a line of text in a description saying "tip: recommended to add |
one major issue that I'm being experiencing randomly is this Building TensorRT engine for B:\GitHub\stable-diffusion-webui\models\Unet-onnx\Anime_Anything-V3.0_Anything-V3.0-fp16_Anything-V3.0-pruned-fp16_38c1ebe3.onnx
: B:\GitHub\stable-diffusion-webui\models\Unet-trt\Anime_Anything-V3.0_Anything-V3.0-fp16_Anything-V3.0-pruned-fp16_38c1ebe3_cc86_sample=1x4x64x64+2x4x64x64+
8x4x96x96-timesteps=1+2+8-encoder_hidden_states=1x77x768+2x77x768+8x154x768.trt
ERROR:asyncio:Exception in callback H11Protocol.timeout_keep_alive_handler()
handle: <TimerHandle when=355099.875 H11Protocol.timeout_keep_alive_handler()>
Traceback (most recent call last):
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 249, in _fire_event_triggered_transitions
new_state = EVENT_TRIGGERED_TRANSITIONS[role][state][event_type]
KeyError: <class 'h11._events.ConnectionClosed'>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Programs\Python\3.10.6\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 363, in timeout_keep_alive_handler
self.conn.send(event)
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 468, in send
data_list = self.send_with_data_passthrough(event)
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 493, in send_with_data_passthrough
self._process_event(self.our_role, event)
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\h11\_connection.py", line 242, in _process_event
self._cstate.process_event(role, type(event), server_switch_event)
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 238, in process_event
self._fire_event_triggered_transitions(role, event_type)
File "B:\GitHub\stable-diffusion-webui\venv\lib\site-packages\h11\_state.py", line 251, in _fire_event_triggered_transitions
raise LocalProtocolError(
h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE the engines does seem to be generated (saved to disk) but the profiles are just not created so webui doesn't see it Cause and patch fixas far that I can see this is caused by |
A hash could replace this, but this will make it even less readable / almost impossible for a user to delete an engine from disk.
|
to be honest I don't consider myself very adept at gradio my self btw |
The issue you encountered with yield is nothing I have ever seen in our internal testing... Would you mind sharing your OS, Gradio and SD WebIUI version?
But this will eliminate the option to have the accordions. Please note that when it comes to changes to the UI/UX, I won't be making the call. |
What exactly are the preinstallation requirements? |
@BurnZeZ did you have tensorrt previously installed? Or have tensorrt on your path? |
@contentis no actually example NVIDIA/Stable-Diffusion-WebUI-TensorRT#4 |
Yes. Before I corrected the path var I had ended up with: |
Ideally this should be discussed in the repository as issue as this is not part of the PR. And people with the similar issues might get something out of it as well. TensorRT 9 should be installed by the extension automatically. Can you check pip freeze? There shouldn't be the need to download tensorrt not having it on the path. |
@contentis just to make you aware, I only add extension to the index if they are in working state
so I don't intend to add this TRT to until at least the "breaking" issues that I found are fixed
|
I fully understand that. In the above case I wouldn't consider it a bug / not working. As this is a version mismatch that needs to be handled by the user. And suggesting to move this to an issue is fair in my opinion. Generally it is arguable what is considered working, due to its hackable nature it is hard to provide a working guarantee. The main issue I see at the moment is the naming collision with the existing plugin. This being said, I'm really happy for your inputs and would love to make this an awesome extension. |
@contentis actually I wasn't referring to the version mismatch issue from BurnZeZ I need to go to bed and I may not have time to review in the next couple of days |
Pip freeze demonstrated that it believed tensorrt was installed within the original automatic1111 tensorrt extension directory (stable-diffusion-webui\extensions\stable-diffusion-webui-tensorrt\TensorRT-8.6.1.6) and after “uninstalling” it (I removed that directory a while ago but maybe the extension had registered it with pip) pip pulled in the correct version. If other people find similar problems after having previously used the other extension they’ll probably need to pip uninstall tensorrt to clear the stale/outdated reference. |
My Details
|
@contentis |
Will do, trying to get some more fixes in that have been reported in the last 24h. Especially addressing the installation process and documentation. |
The discussed issues should be resolved now in the main branch. |
did a test and didn't explode so hurray I'm going to merge it into index thanks for the great work |
I see this as an absolute win Thank you for your support and input! |
Info
Adding TensorRT acceleration for UNet.