mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-05 19:57:06 +08:00
fix rebase error
This commit is contained in:
parent
9b62ebd817
commit
73f7ef5214
@ -7,9 +7,9 @@ from comfy_api.input.video_types import VideoInput
|
|||||||
|
|
||||||
def get_image_dimensions(image: torch.Tensor) -> tuple[int, int]:
|
def get_image_dimensions(image: torch.Tensor) -> tuple[int, int]:
|
||||||
if len(image.shape) == 4:
|
if len(image.shape) == 4:
|
||||||
height, width = image.shape[1], image.shape[2]
|
return image.shape[1], image.shape[2]
|
||||||
elif len(image.shape) == 3:
|
elif len(image.shape) == 3:
|
||||||
height, width = image.shape[0], image.shape[1]
|
return image.shape[0], image.shape[1]
|
||||||
else:
|
else:
|
||||||
raise ValueError("Invalid image tensor shape.")
|
raise ValueError("Invalid image tensor shape.")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user