MCPcopy Create free account
hub / github.com/AlayaLab/Hive / is_k_diffusion_version

Function is_k_diffusion_version

models/flowsep/diffusers/utils/import_utils.py:623–634  ·  view source on GitHub ↗

Args: Compares the current k-diffusion 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

621
622
623def is_k_diffusion_version(operation: str, version: str):
624 """
625 Args:
626 Compares the current k-diffusion version to a given reference with an operation.
627 operation (`str`):
628 A string representation of an operator, such as `">"` or `"<="`
629 version (`str`):
630 A version string
631 """
632 if not _k_diffusion_available:
633 return False
634 return compare_versions(parse(_k_diffusion_version), operation, version)
635
636
637class OptionalDependencyNotAvailable(BaseException):

Callers 1

__init__.pyFile · 0.85

Calls 2

compare_versionsFunction · 0.85
parseFunction · 0.85

Tested by

no test coverage detected