src utils unused imports

This commit is contained in:
RyanOnTheInside
2025-04-26 17:53:04 -04:00
parent f54059810c
commit e9e6824dd4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ particularly between ComfyUI tensor format (BHWC) and OpenCV format.
import torch
import numpy as np
import cv2
from typing import List, Union, Tuple
from typing import List, Tuple
def convert_to_cv2(tensor: torch.Tensor) -> list:
"""Converts a ComfyUI IMAGE tensor (BHWC, float32, 0-1) to a list of cv2 images (BGR, uint8)."""
@@ -61,7 +61,7 @@ def create_mask_from_points(height: int, width: int, points: List[Tuple[int, int
np_points = np.array(points, dtype=np.int32)
hull = cv2.convexHull(np_points)
cv2.fillPoly(mask, [hull], 1)
except Exception as e:
except Exception:
return torch.from_numpy(mask).float().unsqueeze(0).to(device)
mask_tensor = torch.from_numpy(mask).float().unsqueeze(0).to(device)
+1 -1
View File
@@ -8,7 +8,7 @@ Contains functions for mathematical operations including:
"""
import math
from typing import Optional, Tuple, Any
from typing import Optional, Tuple
def scale_value(value: Optional[float],
input_min: float, input_max: float,