stable-diffusion-webui-tensorrt icon indicating copy to clipboard operation
stable-diffusion-webui-tensorrt copied to clipboard

Anyone get TensorRT Extension running with usefull image sizes ?

Open XPHUPZHJ opened this issue 1 year ago • 3 comments

has anyone got the TensorRT Extension run on another model than SD 1.5?

on my system the TensorRT extension is running and generating with the default engines like (512x512 Batch Size 1 Static) or (1024x1024 Batch Size 1 Static) quite fast with good results,

if i try other image size ratios I get the error: ValueError: __len__() should return >= 0

if i have two generated TensorRT-Enginges (512x512 Batch Size 1 Static) and (1024x1024 Batch Size 1 Static) it only works with the resolution 1024x1024. if try to generate 512x512 images, i get the error: RuntimeError: The size of tensor a (64) must match the size of tensor b (128) at non-singleton dimension 3

Where is the problem of the TensorRT Extension with its own engines and profiles? Or other question: how should this Extension be useful to accelerate image generation if nobody is able upscale images with it?

has anybody insight in how this extension is working?


SD a1111 version: [v1.7.0] python: 3.10.11  torch: 2.0.1+cu118  xformers: 0.0.20 Win11 x64 2.5 GHz 16GB RAM Nvidia GForce RTX 4060 Ti 8GB VRAM

XPHUPZHJ avatar Feb 18 '24 15:02 XPHUPZHJ

There are some other compile options in SD-next.. maybe they are easier to get working.

Ph0rk0z avatar Feb 18 '24 23:02 Ph0rk0z

Update extension, use a range for example 768x768 - 1024x1024 | Batch Size 1-4, set low minimum, 512,512 and high maximum to cover the range, 2048.

SamoraHunter avatar Mar 26 '24 12:03 SamoraHunter

yes it works on new one. also there is official extension too

Ph0rk0z avatar Mar 26 '24 14:03 Ph0rk0z