diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

[feat] add `load_lora_adapter()` for compatible models

Open sayakpaul opened this issue 1 year ago • 2 comments

What does this PR do?

Similar to load_attn_procs(), we want to have something similar for loading LoRAs into models, as the LoRA loading logic is generic.

This way, we can reduce the LoC and have better maintainability. I am not too fixated on the load_lora_adapter() name. Could also do load_adapter().

@DN6 as discussed via Slack, could you give this a check? Could also add a save_lora_adapter() method to complement.

sayakpaul avatar Oct 18 '24 15:10 sayakpaul

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@DN6 LMK what you think of the latest changes.

Additionally, what do you think about the save_lora_adapter() method? Can do in another PR, LMK.

sayakpaul avatar Oct 24 '24 15:10 sayakpaul

@BenjaminBossan could you give this a look too?

sayakpaul avatar Oct 31 '24 10:10 sayakpaul

Ran the Flux integration tests and they pass. Failing tests are unrelated.

sayakpaul avatar Nov 02 '24 04:11 sayakpaul