From b149946b85b4534c7d607161fe7f741b84e7ec9c Mon Sep 17 00:00:00 2001 From: KyuHwan00 Date: Sat, 21 Sep 2024 14:43:19 +0900 Subject: [PATCH] Fix invalid mask implementation --- swift/StableDiffusion/pipeline/TextEncoderT5.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/StableDiffusion/pipeline/TextEncoderT5.swift b/swift/StableDiffusion/pipeline/TextEncoderT5.swift index 51ad305..3becdd3 100644 --- a/swift/StableDiffusion/pipeline/TextEncoderT5.swift +++ b/swift/StableDiffusion/pipeline/TextEncoderT5.swift @@ -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