Skip to content

Commit fa84955

Browse files
authored
Fixed the cache diffusion ci/cd (#620)
## What does this PR do? **Type of change:** Bug fix <!-- Use one of the following: Bug fix, new feature, new example, new tests, documentation. --> **Overview:** Fixed the cache diffusion CI/CD issue related to Torch 2.9. ## Usage <!-- You can potentially add a usage example below. --> ```bash pytest tests/examples/diffusers/test_cache_diffusion.py::test_sdxl_benchmarks -v -s ``` ## Testing <!-- Mention how have you tested your change if applicable. --> ## Before your PR is "*Ready for review*" <!-- If you haven't finished some of the above items you can still open `Draft` PR. --> - **Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)** and your commits are signed. - **Is this change backward compatible?**: Yes/No <!--- If No, explain why. --> - **Did you write any new necessary tests?**: Yes/No - **Did you add or update any necessary documentation?**: Yes/No - **Did you update [Changelog](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**: Yes/No <!--- Only for new features, API changes, critical bug fixes or bw breaking changes. --> ## Additional Information <!-- E.g. related issue. --> Signed-off-by: Jingyu Xin <[email protected]>
1 parent 263b2b7 commit fa84955

File tree

1 file changed

+4
-1
lines changed
  • examples/diffusers/cache_diffusion/pipeline

1 file changed

+4
-1
lines changed

examples/diffusers/cache_diffusion/pipeline/deploy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,16 @@ def export_onnx(backbone, onnx_path: Path):
169169
output_names = ONNX_CONFIG[backbone.__class__][f"{name}"]["output_names"]
170170
onnx_export(
171171
module,
172-
args=dummy_input,
172+
args=tuple(dummy_input.values())
173+
if isinstance(dummy_input, dict)
174+
else dummy_input,
173175
f=_onnx_file.as_posix(),
174176
input_names=input_names,
175177
output_names=output_names,
176178
dynamic_axes=ONNX_CONFIG[backbone.__class__][f"{name}"]["dynamic_axes"],
177179
do_constant_folding=True,
178180
opset_version=17,
181+
dynamo=False,
179182
)
180183
else:
181184
print(f"{_onnx_file!s} already exists!")

0 commit comments

Comments
 (0)