[Discussion] allow new merging methods from peft · Issue #6892 · huggingface/diffusers (original) (raw)

We rely on peft to supercharge our support doing all things LoRA: https://huggingface.co/docs/diffusers/main/en/tutorials/using_peft_for_inference.

Currently, it's possible to do multi-LoRA inference seamlessly using peft:
https://huggingface.co/docs/diffusers/main/en/tutorials/using_peft_for_inference#combine-multiple-adapters

However, the limitation of this is the following.

  1. It currently supports only one merging method for combining different LoRAs.
  2. It doesn't benefit from newer and more advanced merging methods from the community, having the potential to improve generation quality even further.

G.O.A.T @pacman100 is adding new merging methods to peft in huggingface/peft#1364, supporting TIES, DARE_LINEAR, etc.

Inspired by that, I quickly cooked up a Colab Notebook, that:

Check #6892 (comment) for more results.

Limitations

Questions to discuss

Tagging everyone that might be interested to say their bits from the HF team:
@younesbelkada, @apolinario, @linoytsaban, @BenjaminBossan.

Folks from the community:
@okotaku, @asomoza, @fabiorigano.

Cc: @yiyixuxu for awareness.