Skip to content

Commit 90cecb0

Browse files
committed
revert the L_k padding, introduced as part of leejet#736
fixes leejet#756
1 parent 5900ef6 commit 90cecb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ggml_extend.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,10 @@ __STATIC_INLINE__ struct ggml_tensor* ggml_nn_attention_ext(struct ggml_context*
875875
d_head == 112 ||
876876
d_head == 128 ||
877877
d_head == 256);
878-
#if 0
878+
#if 1
879879
can_use_flash_attn = can_use_flash_attn && L_k % 256 == 0;
880880
#else
881+
// this causes issues, see https://github.com/leejet/stable-diffusion.cpp/issues/756
881882
if (can_use_flash_attn && L_k % 256 != 0) {
882883
// TODO(Green-Sky): might be worth just padding by default
883884
if (L_k == 77 || L_k == 4208 || L_k == 3952) {

0 commit comments

Comments
 (0)