Comments (6)
TensorRT sometimes is more art than science. It could be that 2048 is so large that, at that point, it doesn't make a difference. For 1024 you can definitely see a performance delta between the opt=512 and opt=1024 engine.
From your experience is 1.0x it/s slow?
from stable-diffusion-webui-tensorrt.
Optimal is the config TensorRT will optimize for, whereas min and max only define the range in which it needs to be operable.
E.g. an engine compiled with optimal width/height set to 512, will perform best when running it at 512x512.
from stable-diffusion-webui-tensorrt.
Optimal is the config TensorRT will optimize for, whereas min and max only define the range in which it needs to be operable. E.g. an engine compiled with optimal width/height set to 512, will perform best when running it at 512x512.
Thanks for the answer!! So if I start my image at 512 and grow it to 2048, do I need 3 engines with Optimal set to 512, 1024, and 2048? how would you recommend setting Optimal?
from stable-diffusion-webui-tensorrt.
Technically, you could do an engine with min=512, opt=1024, max=2048 that covers all cases. But performance will probably be suboptimal at 512 and 2048. How large the performance impact is going to be is hard to estimate. In that case, I'd recommend exporting multiple engines, using your most commonly used resolutions for optimal.
from stable-diffusion-webui-tensorrt.
![base512](https://private-user-images.githubusercontent.com/141563521/276265349-c3094c3f-04aa-44bf-9030-e427cd4fd8cd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4NDEyMjIsIm5iZiI6MTcxOTg0MDkyMiwicGF0aCI6Ii8xNDE1NjM1MjEvMjc2MjY1MzQ5LWMzMDk0YzNmLTA0YWEtNDRiZi05MDMwLWU0MjdjZDRmZDhjZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwMVQxMzM1MjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01OGY1Y2ViNGNkNDA2ZmE1MjNiZjU2ZDA0NjQ5Yzk3MzM0MzdiMjc3YWJiZWQzN2RiMTNjNDQxZTZlODMwNTJmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.p4YveBTT18UN1kI29UdMH7EQRk3-h-W99XymUskyhYE)
![base1024](https://private-user-images.githubusercontent.com/141563521/276265378-bbf175ee-c872-48e9-ae19-2de2cb94a637.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4NDEyMjIsIm5iZiI6MTcxOTg0MDkyMiwicGF0aCI6Ii8xNDE1NjM1MjEvMjc2MjY1Mzc4LWJiZjE3NWVlLWM4NzItNDhlOS1hZTE5LTJkZTJjYjk0YTYzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwMVQxMzM1MjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZGE1ODlhNjc3NjZlNjZlMTZkZjBiNmJlY2E2NDFhMzU1MDQ4N2QzMTU2YTc0NDExZjIxYzU0OGRkN2I0MWNlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.47utKQuPMsvDFXA7HuCI7tiWa3UTzntyYezUiTYiTVw)
![base2048](https://private-user-images.githubusercontent.com/141563521/276265406-5734fe2f-3c70-4260-a5cc-2e4b15270e2f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4NDEyMjIsIm5iZiI6MTcxOTg0MDkyMiwicGF0aCI6Ii8xNDE1NjM1MjEvMjc2MjY1NDA2LTU3MzRmZTJmLTNjNzAtNDI2MC1hNWNjLTJlNGIxNTI3MGUyZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwMVQxMzM1MjJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kYzgwOGY1OWIzNjRjMTAxMGFlMDQ1NTExMDdkYmQ2OGM5OTRjMDRmNzc1YWM0Mzc2NzY1MjkwYTM0MTg3Njk0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.-hRlXflVUTd4UvVrlh8fDQEuVAezcbABGR2NwX7ufHc)
I tried changing the Optimal Width and Height to 512, 1024, and 2048, but it doesn't seem to make much of a difference (I did this by pressing Force Rebuild on TensorRT Export and then creating a new Engine)
from stable-diffusion-webui-tensorrt.
The difference in speed between using TensorRT and not using TensorRT is clear, but it doesn't seem to be an optimal value (at low resolutions, the images are generated very quickly, so it may be that can't tell)
from stable-diffusion-webui-tensorrt.
Related Issues (20)
- TensorRT gives a Runtime Error when Positive prompt value is 150 and Negative prompt value is 75.
- Does tensorRT support direct use of apis, and what are the parameters? HOT 1
- how to generate json config file in the LoRA tab. HOT 1
- [branch: Controlnet_V2] ONNX IR model version conflict, how do i downgrade?
- [E] 3: getPluginCreator could not find plugin: InstanceNormalization_TRT version: 1 when building engine with latest TRT_VERSION="10.0.0b6"
- No config file found for You can generate it in the LoRA tab. HOT 3
- Advise to add promt token check in warning report
- [Feature Request] Add a Command Line Interface for the exporter process.
- AttributeError: 'tensorrt_bindings.tensorrt.ICudaEngine' object has no attribute 'get_profile_shape' HOT 2
- How to process a batch of images with ControlNet TensorRT in img2img ?
- Latest version of automatic1111 wont start with this extension installed. HOT 1
- AttributeError: 'NoneType' object has no attribute 'device_memory' HOT 8
- Error Code 3: API Usage Error (Parameter check failed
- Export LoRA to onnx depending on cyberrealistic_v31 can't fit to v1-5-pruned-emaonly_cnet_1846e6c3c239531e.trt
- TensorRT doesn't install on fresh A1111 install on Ubuntu, stuck at install after copy/paste de git link HOT 10
- TensorRT doesn't find Loras from subdirectories HOT 1
- TensorTR extension is building engine with wrong parameters
- may a name mistake in beta version (utilities.py)
- Engines not loading with text size larger than 75 HOT 1
- SD3 TensoRRT (sd3-clip-t5xxlfp8) works perfectly but cannot get SDXL ... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stable-diffusion-webui-tensorrt.