Repository navigation
fix(laya): LayaModelLoader.load(Path, …) is a member again - #503
Merged
michalharakal merged 1 commit intoOct 17, 2026
Merged
michalharakal merged 1 commit into
michalharakal merged 1 commit into
Conversation
0.62.0 made the JVM convenience an extension on the common object, which needs an explicit import of sk.ainet.models.laya.load; every existing caller of LayaModelLoader.load(dir, ctx, exactGelu) failed to compile. LayaModelLoader is an expect object now: the common suspend load is unchanged on all targets (actuals for the JVM, Android, native, JS, wasmJs and wasmWasi), the JVM actual adds the Path overload as a member, @jvmoverloads restoring the 0.61 Java signature. API dump regenerated; every laya target compiles, jvmTest green.
Merged
michalharakal
added a commit
that referenced
this pull request
Oct 17, 2026
Transformers-only patch: the JVM LayaModelLoader.load(Path, …) member is back (#503). Changelog entry, README current-release line, BOM coordinates in the docs, VERSION_NAME.
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.
0.62.0 turned the JVM convenience
LayaModelLoader.load(directory: Path, ctx, exactGelu, weightFormFor)into an extension on the common object. An extension needs an explicitimport sk.ainet.models.laya.load, so every existing Kotlin caller ofLayaModelLoader.load(dir, ctx, exactGelu = true)fails to compile against 0.62.0 (found while bumping the consumers: Daily-StandAPP and the SemanticEmojiFilter verifier both resolve the common member and report argument mismatches). The 0.62.0 notes claimed source compatibility; that was wrong.Fix.
LayaModelLoaderis anexpectobject. The commonsuspend fun load(files, weights, ctx, exactGelu, weightForm, weightFormFor)keeps its signature and defaults on every target (actuals for JVM, Android, native, JS, wasmJs, wasmWasi delegate to one internal function), and the JVM actual adds thePathoverload as a member,@JvmOverloads, so Java callers get the 0.61load(Path, ExecutionContext, boolean)signature back too.Verification. Every laya target compiles (JVM, JS, wasmJs, wasmWasi, linuxX64, linuxArm64, Android);
apiDumpregenerated —LayaModelLoaderKtis gone,LayaModelLoader.load(Path, …)is back with its three overloads;:llm-inference:laya:jvmTestgreen. The loader body is unchanged, so the FP32 and Q8_0 fixture results of #498 stand.Intended for a 0.62.1 patch release against engine 0.61.0 (a transformers-only fix, per the versioning rule in the changelog).