mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
fix: reset weight adapter for models if no loras in request (#1307)
This commit is contained in:
1 parent
5792c66879
commit
810ef0cf76
1 file changed
+12
@@ -1098,6 +1098,18 @@ public:
|
|||||||
cond_stage_lora_models.clear();
|
cond_stage_lora_models.clear();
|
||||||
diffusion_lora_models.clear();
|
diffusion_lora_models.clear();
|
||||||
first_stage_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()) {
|
if (lora_state.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user