MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / is_accelerate_version

Function is_accelerate_version

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

716
717
718def is_accelerate_version(operation: str, version: str):
719 """
720 Compares the current Accelerate version to a given reference with an operation.
721
722 Args:
723 operation (`str`):
724 A string representation of an operator, such as `">"` or `"<="`
725 version (`str`):
726 A version string
727 """
728 if not _accelerate_available:
729 return False
730 return compare_versions(parse(_accelerate_version), operation, version)
731
732
733def is_peft_version(operation: str, version: str):

Callers 11

mainFunction · 0.90
mainFunction · 0.90
load_lora_weightsMethod · 0.90
module_is_offloadedMethod · 0.85
from_pretrainedMethod · 0.85

Calls 1

compare_versionsFunction · 0.85

Tested by

no test coverage detected