refactor: Remove unused imports and dependencies from utils, recipe_routes, requirements, and pyproject files. See #278

This commit is contained in:
Will Miao
2025-07-10 16:36:28 +08:00
parent 854e8bf356
commit a6f04c6d7e
4 changed files with 8 additions and 10 deletions

View File

@@ -3,7 +3,6 @@ import time
import base64
import numpy as np
from PIL import Image
import torch
import io
import logging
from aiohttp import web
@@ -1018,6 +1017,8 @@ class RecipeRoutes:
shape_info = tensor_image.shape
logger.debug(f"Tensor shape: {shape_info}, dtype: {tensor_image.dtype}")
import torch
# Convert tensor to numpy array
if isinstance(tensor_image, torch.Tensor):
image_np = tensor_image.cpu().numpy()