Skip to content

Commit eb566d7

Browse files
leejetSkutteOleg
authored andcommitted
fix: avoid crash when the lora file is not found using immediately mode (leejet#1022)
1 parent a96a1e7 commit eb566d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stable-diffusion.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,9 @@ class StableDiffusionGGML {
10091009
int64_t t0 = ggml_time_ms();
10101010

10111011
auto lora = load_lora_model_from_file(kv.first, kv.second, backend);
1012+
if (!lora || lora->lora_tensors.empty()) {
1013+
continue;
1014+
}
10121015
lora->apply(tensors, version, n_threads);
10131016
lora->free_params_buffer();
10141017

0 commit comments

Comments
 (0)