MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / is_k_diffusion_version

Function is_k_diffusion_version

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

629
630
631def is_k_diffusion_version(operation: str, version: str):
632 """
633 Args:
634 Compares the current k-diffusion version to a given reference with an operation.
635 operation (`str`):
636 A string representation of an operator, such as `">"` or `"<="`
637 version (`str`):
638 A version string
639 """
640 if not _k_diffusion_available:
641 return False
642 return compare_versions(parse(_k_diffusion_version), operation, version)
643
644
645def get_objects_from_module(module):

Callers 1

__init__.pyFile · 0.85

Calls 1

compare_versionsFunction · 0.85

Tested by

no test coverage detected