modelscope / modelscope/DiffSynth-Studio
[WAN 2.1 14B I2V + Lora] Is it possible to switch between different lora without re-loading base model?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
Hi,
It seems like that the GeneralLoRAFromPeft class currently provides a load method for loading a LoRA model, but there doesn’t appear to be a built-in way to unload it (at least from what we’ve seen).
From what we understood, the load function merges LoRA weights into the base model. As a result, switching between different LoRA models requires reloading the base model each time, which significantly impacts inference performance.
Could you please provide some guidance on how to properly unload a LoRA model and then load a different one, while keeping the base model unchanged?
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the GeneralLoRAFromPeft class and its load method to determine whether loading merges LoRA weights into the base model. Trace how the base model and LoRA weights are managed; done should allow switching to another LoRA without re-loading or altering the base model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100