librediffusion icon indicating copy to clipboard operation
librediffusion copied to clipboard

error when reaching build_enging() when using prebuilt sdxl

Open samamou opened this issue 7 months ago • 1 comments

TypeError: build_engine() got multiple values for keyword argument 'opt_image_height'

this is where they are passed https://github.com/jcelerier/librediffusion/blob/main/src/streamdiffusion/acceleration/tensorrt/init.py#L445C1-L446

[I] Copying external data: 86fa0306-8ebf-11ee-ad41-0242ac110003
[I] Building TensorRT engine from pre-built ONNX...
Traceback (most recent call last):
  File "/home/artia-streamdiffusion/Documents/ossia/score/packages/librediffusion/train-lora.py", line 239, in <module>
    stream = accelerate_with_tensorrt(
        stream,
    ...<5 lines>...
        # use_v2v=True,  # Enable V2V for C++ testing
    )
  File "/home/artia-streamdiffusion/Documents/ossia/score/packages/librediffusion/src/streamdiffusion/acceleration/tensorrt/__init__.py", line 441, in accelerate_with_tensorrt
    build_engine(
    ~~~~~~~~~~~~^
        engine_path=unet_engine_path,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
        **engine_build_options,
        ^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
TypeError: streamdiffusion.acceleration.tensorrt.utilities.build_engine() got multiple values for keyword argument 'opt_image_height'

running with

uv run train-lora.py --type sdxl --model stabilityai/sdxl-turbo \
  --output ./sdxl-engine \
  --min-resolution 1024 --max-resolution 1024 \
  --opt-width 1024 --opt-height 1024

cloned this repo https://huggingface.co/stabilityai/sdxl-turbo-tensorrt and placed it in the same folder

samamou avatar May 05 '26 20:05 samamou

fixed in #7

jcelerier avatar Jun 20 '26 08:06 jcelerier