Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

Correct input checking

Pau Ribaa91c15f6a229
diff --git a/kornia/color/adjust.py b/kornia/color/adjust.py
index 8c9aa73e0..029651a58 100644
--- a/kornia/color/adjust.py
+++ b/kornia/color/adjust.py
@@ -61,9 +61,6 @@ def adjust_hue(input: torch.Tensor, hue_factor: Union[float, torch.Tensor]) -> t
raise TypeError(f"The hue_factor should be a float number or torch.Tensor in the range between"
f" [-0.5, 0.5]. Got {type(hue_factor)}")
- if isinstance(hue_factor, torch.Tensor):
- hue_factor = torch.tensor([hue_factor])
-
if isinstance(hue_factor, float):
hue_factor = torch.tensor([hue_factor])