fix: bump swift-transformers minimum to 1.2.0 (trailing comma fix)#378
Merged
Alex-Wengg merged 2 commits intoFluidInference:mainfrom Mar 15, 2026
Merged
Conversation
swift-transformers 1.1.7–1.1.9 replaced Foundation's JSONSerialization with yyjson for performance but did not enable YYJSON_READ_ALLOW_TRAILING_COMMAS, causing CtcTokenizer.load() to fail on HuggingFace config.json files with trailing commas. Fixed upstream in swift-transformers 1.2.0. Fixes FluidInference#377
f582296 to
c609696
Compare
Contributor
Author
|
Fixed Devin's review comment — ran |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the minimum
swift-transformersdependency from1.1.6to1.2.0to fix JSON parsing failures caused by trailing commas in HuggingFace model config files.Problem
swift-transformers1.1.7–1.1.9 replaced Foundation'sJSONSerializationwithyyjsonfor performance inHubApi.configuration(fileURL:). The yyjson read flags includedYYJSON_READ_ALLOW_INF_AND_NANbut notYYJSON_READ_ALLOW_TRAILING_COMMAS, causing strict rejection of trailing commas thatJSONSerializationpreviously accepted silently.This causes
CtcTokenizer.load(from:)to fail when the model directory contains aconfig.jsonwith trailing commas:Fix
swift-transformers1.2.0 (released March 9, 2026) addsYYJSON_READ_ALLOW_TRAILING_COMMAS | YYJSON_READ_ALLOW_BOMto the yyjson flags. This PR bumps FluidAudio's minimum to1.2.0so all consumers get the fix.Change
Fixes #377