mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-03-24 02:08:51 +00:00
fix: reset weight adapter for models if no loras in request (#1307)
This commit is contained in:
parent
5792c66879
commit
810ef0cf76
@ -1098,6 +1098,18 @@ public:
|
||||
cond_stage_lora_models.clear();
|
||||
diffusion_lora_models.clear();
|
||||
first_stage_lora_models.clear();
|
||||
if (cond_stage_model) {
|
||||
cond_stage_model->set_weight_adapter(nullptr);
|
||||
}
|
||||
if (diffusion_model) {
|
||||
diffusion_model->set_weight_adapter(nullptr);
|
||||
}
|
||||
if (high_noise_diffusion_model) {
|
||||
high_noise_diffusion_model->set_weight_adapter(nullptr);
|
||||
}
|
||||
if (first_stage_model) {
|
||||
first_stage_model->set_weight_adapter(nullptr);
|
||||
}
|
||||
if (lora_state.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user