We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 106a5b7 commit cda4908Copy full SHA for cda4908
optimum/intel/openvino/modeling_diffusion.py
@@ -657,7 +657,8 @@ def _reshape_unet(
657
for inputs in model.inputs:
658
shapes[inputs] = inputs.get_partial_shape()
659
if inputs.get_any_name() == "timestep":
660
- shapes[inputs][0] = 1
+ if shapes[inputs].rank == 1:
661
+ shapes[inputs][0] = 1
662
elif inputs.get_any_name() == "sample":
663
in_channels = self.unet.config.get("in_channels", None)
664
if in_channels is None:
0 commit comments