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

Function is_bitsandbytes_version

src/diffusers/utils/import_utils.py:797–808  ·  view source on GitHub ↗

Args: Compares the current bitsandbytes version to a given reference with an operation. 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

795
796@cache
797def is_bitsandbytes_version(operation: str, version: str):
798 """
799 Args:
800 Compares the current bitsandbytes version to a given reference with an operation.
801 operation (`str`):
802 A string representation of an operator, such as `">"` or `"<="`
803 version (`str`):
804 A version string
805 """
806 if not _bitsandbytes_available:
807 return False
808 return compare_versions(parse(_bitsandbytes_version), operation, version)
809
810
811@cache

Callers 7

toMethod · 0.85
cudaMethod · 0.85
toMethod · 0.85
validate_environmentMethod · 0.85
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…