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

Function is_peft_version

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

779
780@cache
781def is_peft_version(operation: str, version: str):
782 """
783 Compares the current PEFT version to a given reference with an operation.
784
785 Args:
786 operation (`str`):
787 A string representation of an operator, such as `">"` or `"<="`
788 version (`str`):
789 A version string
790 """
791 if not _peft_available:
792 return False
793 return compare_versions(parse(_peft_version), operation, version)
794
795
796@cache

Callers 15

get_lora_configFunction · 0.90
_create_lora_configFunction · 0.85
load_attn_procsMethod · 0.85
_process_loraMethod · 0.85
load_lora_adapterMethod · 0.85
lora_pipeline.pyFile · 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…