(self)
| 593 | disable_lora_for_text_encoder(model) |
| 594 | |
| 595 | def enable_lora(self): |
| 596 | if not USE_PEFT_BACKEND: |
| 597 | raise ValueError("PEFT backend is required for this method.") |
| 598 | |
| 599 | for component in self._lora_loadable_modules: |
| 600 | model = getattr(self, component, None) |
| 601 | if model is not None: |
| 602 | if issubclass(model.__class__, ModelMixin): |
| 603 | model.enable_lora() |
| 604 | elif issubclass(model.__class__, PreTrainedModel): |
| 605 | enable_lora_for_text_encoder(model) |
| 606 | |
| 607 | def delete_adapters(self, adapter_names: Union[List[str], str]): |
| 608 | """ |
nothing calls this directly
no test coverage detected