Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__
*.trt
8 changes: 8 additions & 0 deletions models/sd_unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ def __init__(
**kwargs,
)

@classmethod
def from_model(cls, model, **kwargs):
return super(SD21UnclipL_TRT, cls).from_model(model, use_control=True)


class SD21UnclipH_TRT(UNetTRT):
def __init__(
Expand All @@ -214,6 +218,10 @@ def __init__(
**kwargs,
)

@classmethod
def from_model(cls, model, **kwargs):
return super(SD21UnclipH_TRT, cls).from_model(model, use_control=True)


class SDXLRefiner_TRT(UNetTRT):
def __init__(
Expand Down
8 changes: 3 additions & 5 deletions tensorrt_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ def _convert(
full_output_folder, f"{filename}_{counter:05}_.engine"
)

batch_multiplier = (
2 if model_helper.is_conditional else 1
) # TODO lets see if we really want this
batch_multiplier = 1
if model_version == "SVD_img2vid":
batch_multiplier *= num_video_frames
success = trt_model.build(
Expand Down Expand Up @@ -338,7 +336,7 @@ def convert(
context_opt,
context_max,
num_video_frames,
onnx_model_path,
onnx_model_path = None,
):
return super()._convert(
model,
Expand Down Expand Up @@ -431,7 +429,7 @@ def convert(
width_opt,
context_opt,
num_video_frames,
onnx_model_path,
onnx_model_path = None,
):
return super()._convert(
model,
Expand Down