MCPcopy Create free account
hub / github.com/huggingface/diffusers / is_sageattention_version

Function is_sageattention_version

src/diffusers/utils/import_utils.py:892–904  ·  view source on GitHub ↗

Compares the current sageattention version to a given reference with an operation. Args: operation (`str`): A string representation of an operator, such as `">"` or `"<="` version (`str`): A version string

(operation: str, version: str)

Source from the content-addressed store, hash-verified

890
891@cache
892def is_sageattention_version(operation: str, version: str):
893 """
894 Compares the current sageattention version to a given reference with an operation.
895
896 Args:
897 operation (`str`):
898 A string representation of an operator, such as `">"` or `"<="`
899 version (`str`):
900 A version string
901 """
902 if not _sageattention_available:
903 return False
904 return compare_versions(parse(_sageattention_version), operation, version)
905
906
907@cache

Callers 1

Calls 1

compare_versionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…