Handle crop_shape=None in Diffusion Policy (#219)

This commit is contained in:
Alexander Soare
2024-05-28 18:27:33 +01:00
committed by GitHub
parent e3b9f1c19b
commit 3d625ae6d3
3 changed files with 8 additions and 6 deletions

View File

@@ -155,7 +155,7 @@ class DiffusionConfig:
f"{self.__class__.__name__} only handles one image for now. Got image keys {image_keys}."
)
image_key = next(iter(image_keys))
if (
if self.crop_shape is not None and (
self.crop_shape[0] > self.input_shapes[image_key][1]
or self.crop_shape[1] > self.input_shapes[image_key][2]
):