add more debug output for token count

This commit is contained in:
2026-02-19 12:38:46 +01:00
parent 2774fb8379
commit def76b02b5

View File

@@ -91,7 +91,7 @@ final class KokoroPipeline {
private func synthesizeTokenIds(_ tokenIdsAll: [Int], phonemeScalarCount: Int) throws -> [Float] { private func synthesizeTokenIds(_ tokenIdsAll: [Int], phonemeScalarCount: Int) throws -> [Float] {
let tokenIds = [0] + tokenIdsAll + [0] let tokenIds = [0] + tokenIdsAll + [0]
print("Token count: \(tokenIds.count)") print("Token count: \(tokenIds.count) (input: \(tokenIdsAll.count) + 2 for start/end)")
let inputIds = try MLMultiArray(shape: [1, 128], dataType: .int32) let inputIds = try MLMultiArray(shape: [1, 128], dataType: .int32)
let attention = try MLMultiArray(shape: [1, 128], dataType: .int32) let attention = try MLMultiArray(shape: [1, 128], dataType: .int32)