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

Function is_gguf_version

src/diffusers/utils/import_utils.py:812–824  ·  view source on GitHub ↗

Compares the current Accelerate 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

810
811@cache
812def is_gguf_version(operation: str, version: str):
813 """
814 Compares the current Accelerate version to a given reference with an operation.
815
816 Args:
817 operation (`str`):
818 A string representation of an operator, such as `">"` or `"<="`
819 version (`str`):
820 A version string
821 """
822 if not _gguf_available:
823 return False
824 return compare_versions(parse(_gguf_version), operation, version)
825
826
827@cache

Callers 1

validate_environmentMethod · 0.85

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…