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

Function is_peft_version

diffusers/src/diffusers/utils/import_utils.py:733–745  ·  view source on GitHub ↗

Compares the current PEFT 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

731
732
733def is_peft_version(operation: str, version: str):
734 """
735 Compares the current PEFT version to a given reference with an operation.
736
737 Args:
738 operation (`str`):
739 A string representation of an operator, such as `">"` or `"<="`
740 version (`str`):
741 A version string
742 """
743 if not _peft_version:
744 return False
745 return compare_versions(parse(_peft_version), operation, version)
746
747
748def is_k_diffusion_version(operation: str, version: str):

Callers 15

load_attn_procsMethod · 0.85
_process_loraMethod · 0.85
lora_pipeline.pyFile · 0.85
load_lora_weightsMethod · 0.85
load_lora_into_unetMethod · 0.85
load_lora_weightsMethod · 0.85
load_lora_into_unetMethod · 0.85
load_lora_weightsMethod · 0.85

Calls 1

compare_versionsFunction · 0.85

Tested by

no test coverage detected