Skip to content

Commit

Permalink
Fix invalid mask implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
KyuHwan00 committed Sep 21, 2024
1 parent cab24e9 commit b149946
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swift/StableDiffusion/pipeline/TextEncoderT5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public struct TextEncoderT5: TextEncoderT5Model {

let attentionMaskName = "attention_mask"
var attentionMask: [Int] = inputIds.map { token in
token == padToken ? maskToken : padToken
token == padToken ? padToken : maskToken
}
attentionMask[0] = bosToken

Expand Down

0 comments on commit b149946

Please sign in to comment.