Skip to content

Commit c2e18c8

Browse files
authored
fix: make flash attn work with high noise diffusion model (#1111)
1 parent c3ad6a1 commit c2e18c8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stable-diffusion.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ class StableDiffusionGGML {
537537
if (sd_ctx_params->diffusion_flash_attn) {
538538
LOG_INFO("Using flash attention in the diffusion model");
539539
diffusion_model->set_flash_attn_enabled(true);
540+
if (high_noise_diffusion_model) {
541+
high_noise_diffusion_model->set_flash_attn_enabled(true);
542+
}
540543
}
541544

542545
cond_stage_model->alloc_params_buffer();
@@ -3723,6 +3726,9 @@ SD_API sd_image_t* generate_video(sd_ctx_t* sd_ctx, const sd_vid_gen_params_t* s
37233726
init_latent = sd_ctx->sd->generate_init_latent(work_ctx, width, height, frames, true);
37243727
}
37253728

3729+
print_ggml_tensor(init_latent, true);
3730+
print_ggml_tensor(concat_latent, true);
3731+
37263732
// Get learned condition
37273733
ConditionerParams condition_params;
37283734
condition_params.clip_skip = sd_vid_gen_params->clip_skip;

0 commit comments

Comments
 (0)