NVIDIA / Stable-Diffusion-WebUI-TensorRT

TensorRT Extension for Stable Diffusion Web UI
MIT License
1.84k stars 139 forks source link

TensorRT disappeared. #271

Open player99963 opened 5 months ago

player99963 commented 5 months ago

image

I've recently noticed that it's disappeared and I don't know why. I've tried disabling all other extensions and reinstalling TensorRT, but still no change.

image

Cancel venv "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\Scripts\Python.exe" Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: v1.7.0 Commit hash: cf2772fab0af5573da775e7437e6acdca424f26e Launching Web UI with arguments: --autolaunch --theme dark No module 'xformers'. Proceeding without it. Loading weights [1449e5b0b9] from D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\Stable-diffusion\測試\XL\animagineXLV3_v30.safetensors *** Error executing callback ui_tabs_callback for D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\Stable-Diffusion-WebUI-TensorRT\scripts\trt.py Traceback (most recent call last): File "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\modules\script_callbacks.py", line 166, in ui_tabs_callback res += c.callback() or [] File "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\Stable-Diffusion-WebUI-TensorRT\ui_trt.py", line 682, in on_ui_tabs elem_id=f"trt_profiles_markdown", value=get_trt_profiles_markdown() File "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\Stable-Diffusion-WebUI-TensorRT\ui_trt.py", line 657, in get_trt_profiles_markdown engine_cards, lora_cards = engine_profile_card() File "D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\extensions\Stable-Diffusion-WebUI-TensorRT\ui_trt.py", line 370, in engine_profile_card s_min, s_opt, s_max = m["config"].profile.get( AttributeError: 'list' object has no attribute 'get'


Running on local URL: http://127.0.0.1:7860 Creating model from config: D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\repositories\generative-models\configs\inference\sd_xl_base.yaml

To create a public link, set share=True in launch(). Startup time: 24.5s (prepare environment: 1.4s, import torch: 1.7s, import gradio: 0.5s, setup paths: 0.4s, initialize shared: 0.2s, other imports: 0.3s, setup codeformer: 0.1s, list SD models: 0.2s, load scripts: 18.2s, create ui: 0.4s, gradio launch: 1.1s). Loading VAE weights specified in settings: D:\A1111 Web UI Autoinstaller\stable-diffusion-webui\models\VAE\新增資料夾\mastervae_v1Safetensors.safetensors Applying attention optimization: sdp... done. Model loaded in 5.1s (load weights from disk: 1.0s, create model: 0.7s, apply weights to model: 3.0s).

dkhold commented 5 months ago

Same here, right after upgrading.

Gyramuur commented 4 months ago

I've got nothing to add except to say "me too", lol. TensorRT wasn't working with SDXL, so I figured it needed to be updated. I wouldn't have updated if I knew that it was going to completely remove the tab.

J-Cott commented 4 months ago

This usually happens If you move or delete one of the Unet-Onnx files or mess up the \stable-diffusion-webui\models\Unet-trt\model.json

You could try deleting your model.json (take a backup) and it will rebuild it and the tab show show again. but you will have to re-export your Unets (unless you are patent enough to rebuild the file exactly by hand.) I haven't updated to 1.8 yet so haven't actually tried this.

Rakly3 commented 3 months ago

Certain updates will make your existing models incompatible. See https://github.com/NVIDIA/Stable-Diffusion-WebUI-TensorRT/issues/286#issuecomment-2002299918

Zn10plays commented 3 months ago

If you have lora models with json config, they must include the "sd version" property. If they are not present, the tab will not appear.

you can delete all lora json configs, or git checkout dev branch where a solution was recently merged.

shawnisikli commented 3 months ago

Hey, i found a solution that worked for me at least! go to the main stable diffusion folder, then to models, then to Unet-trt. (\stable-diffusion-webui\models\Unet-trt). Then you have to delete all the Lora files that you trained in that folder. For some reason, the loras have some issues between updates. After restarting the webui it should work.