Skip to content

Commit 06c2b15

Browse files
committed
fix: avoid crash when the lora file is not found using immediately mode
1 parent bc80225 commit 06c2b15

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
@@ -991,6 +991,9 @@ class StableDiffusionGGML {
991991
int64_t t0 = ggml_time_ms();
992992

993993
auto lora = load_lora_model_from_file(kv.first, kv.second, backend);
994+
if (!lora || lora->lora_tensors.empty()) {
995+
continue;
996+
}
994997
lora->apply(tensors, version, n_threads);
995998
lora->free_params_buffer();
996999

0 commit comments

Comments
 (0)