Skip to content

Commit b8bf676

Browse files
authored
fix: correct dangling pointer to empty image reference vector (#1813)
1 parent 8d37707 commit b8bf676

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5071,8 +5071,8 @@ static std::optional<ImageGenerationEmbeds> prepare_image_generation_embeds(sd_c
50715071
}
50725072
condition_params.text = request->negative_prompt;
50735073
condition_params.zero_out_masked = zero_out_masked;
5074+
std::vector<sd::Tensor<float>> empty_ref_images;
50745075
if (use_ref_latent_img_cfg) {
5075-
std::vector<sd::Tensor<float>> empty_ref_images;
50765076
condition_params.ref_images = &empty_ref_images;
50775077
}
50785078
img_uncond = sd_ctx->sd->cond_stage_model->get_learned_condition(sd_ctx->sd->n_threads,

0 commit comments

Comments
 (0)