MCPcopy Index your code
hub / github.com/huggingface/diffusers / is_optimum_quanto_version

Function is_optimum_quanto_version

src/diffusers/utils/import_utils.py:844–856  ·  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

842
843@cache
844def is_optimum_quanto_version(operation: str, version: str):
845 """
846 Compares the current Accelerate version to a given reference with an operation.
847
848 Args:
849 operation (`str`):
850 A string representation of an operator, such as `">"` or `"<="`
851 version (`str`):
852 A version string
853 """
854 if not _optimum_quanto_available:
855 return False
856 return compare_versions(parse(_optimum_quanto_version), operation, version)
857
858
859@cache

Callers 1

validate_environmentMethod · 0.90

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…