AUTOMATIC1111 / stable-diffusion-webui-tensorrt

MIT License
310 stars 20 forks source link

Anyone get TensorRT Extension running with usefull image sizes ? #84

Open XPHUPZHJ opened 5 months ago

XPHUPZHJ commented 5 months ago

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

SamoraHunter commented 4 months ago

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.