@@ -531,7 +531,7 @@ class StableDiffusionGGML {
531531 }
532532 if (strlen (SAFE_STR (sd_ctx_params->photo_maker_path )) > 0 ) {
533533 pmid_lora = std::make_shared<LoraModel>(backend, sd_ctx_params->photo_maker_path , " " );
534- if (!pmid_lora->load_from_file (true )) {
534+ if (!pmid_lora->load_from_file (true , n_threads )) {
535535 LOG_WARN (" load photomaker lora tensors from %s failed" , sd_ctx_params->photo_maker_path );
536536 return false ;
537537 }
@@ -599,14 +599,14 @@ class StableDiffusionGGML {
599599 if (!use_tiny_autoencoder) {
600600 vae_params_mem_size = first_stage_model->get_params_buffer_size ();
601601 } else {
602- if (!tae_first_stage->load_from_file (taesd_path)) {
602+ if (!tae_first_stage->load_from_file (taesd_path, n_threads )) {
603603 return false ;
604604 }
605605 vae_params_mem_size = tae_first_stage->get_params_buffer_size ();
606606 }
607607 size_t control_net_params_mem_size = 0 ;
608608 if (control_net) {
609- if (!control_net->load_from_file (SAFE_STR (sd_ctx_params->control_net_path ))) {
609+ if (!control_net->load_from_file (SAFE_STR (sd_ctx_params->control_net_path ), n_threads )) {
610610 return false ;
611611 }
612612 control_net_params_mem_size = control_net->get_params_buffer_size ();
@@ -836,7 +836,7 @@ class StableDiffusionGGML {
836836 return ;
837837 }
838838 LoraModel lora (backend, file_path, is_high_noise ? " model.high_noise_" : " " );
839- if (!lora.load_from_file ()) {
839+ if (!lora.load_from_file (false , n_threads )) {
840840 LOG_WARN (" load lora tensors from %s failed" , file_path.c_str ());
841841 return ;
842842 }
0 commit comments