Trusted cursor too much, fixed torchaudio bool

This commit is contained in:
Jedrzej Kosinski 2025-08-07 14:46:01 -07:00
parent 982965f872
commit f65319d980

View File

@ -9,12 +9,11 @@ from typing import Type
import av
import numpy as np
import torch
TORCH_AUDIO_AVAILABLE = False
if TORCH_AUDIO_AVAILABLE:
try:
import torchaudio
except ImportError:
TORCH_AUDIO_AVAILABLE = False
try:
import torchaudio
TORCH_AUDIO_AVAILABLE = True
except ImportError:
TORCH_AUDIO_AVAILABLE = False
from PIL import Image as PILImage
from PIL.PngImagePlugin import PngInfo