From 868c29cff3e9fe5bee91ede16a8c336d5d950429 Mon Sep 17 00:00:00 2001 From: Alan Li Date: Fri, 24 Jul 2026 16:01:01 -0400 Subject: [PATCH] Gate supports_nvfp4_compute on CUDA 13+ build (fixes #11864) cuBLAS FP4 matmul kernels (cublasLtMatmulAlgoGetHeuristic) require CUDA 13.0+. On Blackwell GPUs with torch built against CUDA <13 (e.g. cu128), the previous check only looked at compute capability and let native NVFP4 through, causing CUBLAS_STATUS_NOT_SUPPORTED errors or VRAM blowups at matmul time. Now falls back to the regular quantized-storage path when the CUDA build is too old. Co-Authored-By: Claude Fable 5 --- comfy/model_management.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/comfy/model_management.py b/comfy/model_management.py index 9f8e7f07b..017df17d1 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -1963,6 +1963,14 @@ def supports_nvfp4_compute(device=None): if props.major < 10: return False + # cuBLAS FP4 matmul kernels require CUDA 13+, see #11864 + try: + cuda_version_major = int(torch.version.cuda.split(".")[0]) + except: + return False + if cuda_version_major < 13: + return False + return True def supports_mxfp8_compute(device=None):