Skip to content

Commit

Permalink
Fix TypeError: expected size to be one of int or Tuple[int] or Tuple[…
Browse files Browse the repository at this point in the history
…int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int32'>, <class 'numpy.int32'>]
  • Loading branch information
Fannovel16 committed Jan 22, 2024
1 parent b3537c0 commit 148d737
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controlnet_aux/depth_anything/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __call__(self, input_image, detect_resolution=512, output_type=None, upscale

device = next(iter(self.model.parameters())).device
h, w = t.shape[:2]
h, w = int(h), int(w)
image = transform({'image': input_image / 255.})['image']
image = torch.from_numpy(image).unsqueeze(0).to(device)

Expand Down

0 comments on commit 148d737

Please sign in to comment.