From 2b26d5539e815c9f3602531911a551154faf6d9a Mon Sep 17 00:00:00 2001 From: Kenneth Estanislao Date: Thu, 9 Apr 2026 16:04:00 +0800 Subject: [PATCH] supress error message Some people just want the opencv error gone. I keep on telling them that it is only for blurs and color conversion. It is the onnx runtime who is running the swap. --- modules/gpu_processing.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/gpu_processing.py b/modules/gpu_processing.py index 8c3e166..b6c8728 100644 --- a/modules/gpu_processing.py +++ b/modules/gpu_processing.py @@ -38,16 +38,9 @@ try: CUDA_AVAILABLE = True print("[gpu_processing] OpenCV CUDA support detected – GPU-accelerated processing enabled.") else: - missing = [] - if not _has_gauss: - missing.append("createGaussianFilter") - if not _has_resize: - missing.append("resize") - if not _has_cvt: - missing.append("cvtColor") - print(f"[gpu_processing] cv2.cuda.GpuMat exists but missing: {', '.join(missing)} – falling back to CPU.") + pass # silently fall back to CPU except Exception: - print("[gpu_processing] OpenCV CUDA not available – using CPU fallback for all operations.") + pass # silently fall back to CPU # ---------------------------------------------------------------------------