Skip to content

How to reproduce the stable diffusion acceleration by tensorrt #57

Closed

Description

@luchangli03

I have tried using TensorRT-Model-Optimizer to quantize stable diffusion 1.5 and comparing performance with pytorch and I found that TensorRT is even slower than pytorch.
My testing environment: V100 GPU, cuda 11.8, pytorch 2.4, TensorRT 10.2
The unet time per iteration is 55ms for pytorch without torch compile, while for tensorrt, it's 48ms and 58ms for fp16 and int8 respectively. It's strange that int8 is even much slower and both FP16 and int8 can't get much acceleration than pytorch.
So which tensorrt version should I use and can you give more detailed workflow to reproduce the results shown in https://developer.nvidia.com/blog/accelerate-generative-ai-inference-performance-with-nvidia-tensorrt-model-optimizer-now-publicly-available/
Thank you very much.

Activity

  1. luchangli03 commented on Aug 20, 2024

    @luchangli03
    Author

    the default tensorrt conversion can't provide much acceleration, but we need extra plugin shown in https://zhuanlan.zhihu.com/p/600216796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions