From f65319d9809af6c6c59d4e2796085df66234db32 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Thu, 7 Aug 2025 14:46:01 -0700 Subject: [PATCH] Trusted cursor too much, fixed torchaudio bool --- comfy_api/latest/_ui.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/comfy_api/latest/_ui.py b/comfy_api/latest/_ui.py index 63afc7f4e..61597038f 100644 --- a/comfy_api/latest/_ui.py +++ b/comfy_api/latest/_ui.py @@ -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