Skip to content

Commit c92e14a

Browse files
committed
Workaround for flash attention with img2img
leejet/stable-diffusion.cpp#756
1 parent b9dfbfb commit c92e14a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

otherarch/sdcpp/ggml_extend.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,8 @@ __STATIC_INLINE__ struct ggml_tensor* ggml_nn_attention_ext(struct ggml_context*
984984
d_head == 112 ||
985985
d_head == 128 ||
986986
d_head == 256);
987-
#if 0
987+
// kcpp disable kv_pad (leejet/stable-diffusion.cpp#756)
988+
#if 1
988989
can_use_flash_attn = can_use_flash_attn && L_k % 256 == 0;
989990
#else
990991
if (can_use_flash_attn && L_k % 256 != 0) {

0 commit comments

Comments
 (0)