1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00
This commit is contained in:
sayakpaul
2025-08-26 12:07:46 +02:00
parent 87d08798de
commit 2bb3796569
2 changed files with 6 additions and 2 deletions

View File

@@ -374,6 +374,10 @@ def _check_attention_backend_requirements(backend: AttentionBackendName) -> None
raise RuntimeError(
f"Flash Attention 3 Hub backend '{backend.value}' is not usable because the `kernels` package isn't available. Please install it with `pip install kernels`."
)
if flash_attn_3_hub_func is None:
raise RuntimeError(
"`flash_attn_3_hub_func` wasn't available. Please double if `kernels` was able to successfully pull the FA3 kernel from kernels-community/vllm-flash-attn3."
)
elif backend in [AttentionBackendName._FLASH_VARLEN_3_HUB]:
raise NotImplementedError

View File

@@ -13,5 +13,5 @@ def _get_fa3_from_hub():
try:
flash_attn_3_hub = get_kernel(_DEFAULT_HUB_ID_FA3)
return flash_attn_3_hub
except Exception as e:
raise e
except Exception:
return None