diff --git a/src/diffusers/models/attention_dispatch.py b/src/diffusers/models/attention_dispatch.py index 9bb3a6fbd0ce..837d573d8c4d 100644 --- a/src/diffusers/models/attention_dispatch.py +++ b/src/diffusers/models/attention_dispatch.py @@ -540,7 +540,7 @@ def _check_attention_backend_requirements(backend: AttentionBackendName) -> None f"Backend '{backend.value}' needs to be used with a `kernels` version of at least 0.12. Please update with `pip install -U kernels`." ) - if backend == AttentionBackendName.FLASH_4_HUB and not is_kernels_available(">=", "0.12.3"): + if backend == AttentionBackendName.FLASH_4_HUB and not is_kernels_version(">=", "0.12.3"): raise RuntimeError( f"Backend '{backend.value}' needs to be used with a `kernels` version of at least 0.12.3. Please update with `pip install -U kernels`." )