Giter Site home page Giter Site logo

Comments (6)

contentis avatar contentis commented on July 21, 2024 1

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.

contentis avatar contentis commented on July 21, 2024

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.

carnivar10 avatar carnivar10 commented on July 21, 2024

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.

contentis avatar contentis commented on July 21, 2024

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.

carnivar10 avatar carnivar10 commented on July 21, 2024
base512 base1024 base2048

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.

carnivar10 avatar carnivar10 commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.