kohya-ss / kohya-ss/sd-scripts

How can I switch between LoRA models dynamically?

Open
#2,126 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

I have trained several LoRA models using the Flux model, and I want to switch between these LoRA models dynamically without reloading the base Flux model.

I saw in #1185 that the methods `backup_weights`, `pre_calculation`, and `restore_weights` can be used to achieve this, but there are no examples provided. Could you please share an example of how to use them in practice?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading issue #1185 and the references to `backup_weights`, `pre_calculation`, and `restore_weights`. Done means providing a practical example showing how to switch among trained LoRA models without reloading the base Flux model.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.