Skip to content

Commit b149946

Browse files
committed
Fix invalid mask implementation
1 parent cab24e9 commit b149946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/StableDiffusion/pipeline/TextEncoderT5.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public struct TextEncoderT5: TextEncoderT5Model {
9191

9292
let attentionMaskName = "attention_mask"
9393
var attentionMask: [Int] = inputIds.map { token in
94-
token == padToken ? maskToken : padToken
94+
token == padToken ? padToken : maskToken
9595
}
9696
attentionMask[0] = bosToken
9797

0 commit comments

Comments
 (0)