Files
499096bdb0 Super resolution (#18)
* Added Super Resolution to the streampack
* Super Resolution created by ryan, updated for missing 
* add prestartup script to check for opencv-cuda

---------

Co-authored-by: ryanontheinside <7623207+ryanontheinside@users.noreply.github.com>
Co-authored-by: John | Elite Encoder <john@eliteencoder.net>
2025-04-04 17:21:47 -04:00

22 lines
723 B
Python

import logging
# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
def check_opencv_cuda():
try:
import cv2
# Check if CUDA is already available
logger.info("ComfyUI-Stream-Pack: Checking OpenCV CUDA availability...")
if hasattr(cv2, 'cuda') and cv2.cuda.getCudaEnabledDeviceCount() > 0:
logger.info("OpenCV CUDA is installed and working")
return True
else:
logger.warning("OpenCV CUDA is not available or not working. Super Resolution node may not work")
return False
except ImportError:
logger.warning("OpenCV is not installed")
return False
check_opencv_cuda()