1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00
This commit is contained in:
DN6
2025-10-07 17:45:42 +05:30
parent 0845ca07d3
commit 8018a6a733

View File

@@ -1524,10 +1524,11 @@ class ModelMixin(torch.nn.Module, PushToHubMixin):
attention_backend = AttentionBackendName(attention_backend)
if not _AttentionBackendRegistry._is_context_parallel_available(attention_backend):
compatible_backends = sorted(_AttentionBackendRegistry._supports_context_parallel)
raise ValueError(
f"Context parallelism is enabled but the attention processor '{processor.__class__.__name__}' "
f"is using backend '{attention_backend.value}' which does not support context parallelism. "
f"Please set a compatible attention backend: {_AttentionBackendRegistry._supports_context_parallel} using `model.set_attention_backend()` before "
f"Please set a compatible attention backend: {compatible_backends}) using `model.set_attention_backend()` before "
f"calling `enable_parallelism()`."
)