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

Function check_if_lora_correctly_set

diffusers/tests/lora/utils.py:59–66  ·  view source on GitHub ↗

Checks if the LoRA layers are correctly set with peft

(model)

Source from the content-addressed store, hash-verified

57
58
59def check_if_lora_correctly_set(model) -> bool:
60 """
61 Checks if the LoRA layers are correctly set with peft
62 """
63 for module in model.modules():
64 if isinstance(module, BaseTunerLayer):
65 return True
66 return False
67
68
69def initialize_dummy_state_dict(state_dict):

Calls

no outgoing calls