Nodes/ComfyUI CV/cv2.ocl.haveAmdBlas
ComfyUI Node

cv2.ocl.haveAmdBlas

Does your OpenCV have the AMD BLAS extension?

By bmad4ever·Created 3 months ago·Updated 14 days ago· 1
cv2.ocl.haveAmdBlas
    • bool

    cv2.ocl.haveAmdBlas reports whether OpenCV can use the AMD clAmdBlas extension for its linear-algebra kernels. No inputs, one BOOLEAN output, and the answer on the overwhelming majority of machines is false.

    That's the useful part of the article: this is a probe for a very specific hardware path, and if you're on an NVIDIA or Intel system - which is most ComfyUI users - the boolean will be false and that's not a problem to solve. The extension only lights up when OpenCV is running on an AMD GPU whose driver ships the clAmdBlas library, and it enables AMD's own optimized BLAS routines for the OpenCV operations that map onto them (the matrix-multiply-shaped ones, and in the sibling node's case the FFTs).

    So who is this node for? Someone on an AMD card asking whether OpenCV is actually using the vendor libraries, or someone debugging why a cv2-heavy analysis pipeline performs differently between two machines with the same GPU. It is genuinely a diagnostic and genuinely niche. Do not go install an ancient AMD APP SDK to make it return true; you'd be spending an afternoon to change which library multiplies your matrices.

    How to read it

    The pack queries all four cv2.ocl functions the same way - no inputs, boolean out - so this node behaves identically to cv2.ocl.haveOpenCL and cv2.ocl.haveAmdFft. Stack the three if you're genuinely profiling: haveOpenCL false makes the AMD probes moot, since the whole OpenCL path is unavailable; haveOpenCL true with haveAmdBlas false means generic OpenCL is there but the AMD-specific kernels aren't.

    Two mechanical notes. Because there are no inputs, the node is evaluated once and cached; the value can't change mid-session. And the BOOLEAN output goes wherever booleans go - a note, a log, a switch - though wiring it into anything that controls pixels is a sign you've misread what it does.

    If you want the full picture in one place, the pack's curated CV Build Information node prints OpenCV's build banner with paths redacted, covering Eigen, non-free, OpenCL and CUDA. That's the better first stop; these raw probes are what the auto-generated layer happens to expose.

    Install

    ComfyUI Manager → search ComfyUI CV → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bmad4ever/comfyui_cv
    pip install "opencv-contrib-python-headless~=5.0.0.93"
    

    Python ≥ 3.12, ComfyUI on the V3 node API. This is a contrib-submodule node, so it exists only with the contrib wheel. The classic way to lose it: letting a non-contrib opencv-python or opencv-python-headless install over the contrib one, which quietly empties the contrib submodules and takes every contrib node in the pack with it. tools/repair_opencv_contrib.py --check diagnoses it, --apply repairs it.

    Categoryimage/CV/low-level/ocl

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    boolBOOLEAN—