Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tensorrt_llm/inputs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from urllib.parse import urlparse

import aiohttp
import cv2
import numpy as np
import requests
import torch
Expand Down Expand Up @@ -88,6 +87,9 @@ def load_video(
format: str = "pt",
device: str = "cuda") -> Union[List[Image.Image], List[torch.Tensor]]:

# Keep this import local to avoid importing cv2 if not needed
import cv2

assert format in ["pt", "pil"], "format must be either Pytorch or PIL"

# Load video frames from a video file
Expand Down