We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6674c88 commit 16a8ac5Copy full SHA for 16a8ac5
1 file changed
pkg/distribution/internal/bundle/unpack.go
@@ -18,11 +18,9 @@ import (
18
// - V0.2 (layer-per-file with annotations): Uses UnpackFromLayers for full path preservation
19
// - V0.1 (legacy): Uses the original unpacking logic based on GGUFPaths(), SafetensorsPaths(), etc.
20
func Unpack(dir string, model types.Model) (*Bundle, error) {
21
- // Check if the model uses V0.2 packaging (layer-per-file with annotations)
22
- if artifact, ok := model.(types.ModelArtifact); ok {
23
- if isV02Model(artifact) {
24
- return UnpackFromLayers(dir, artifact)
25
- }
+ artifact, isArtifact := model.(types.ModelArtifact)
+ if isArtifact && isV02Model(artifact) {
+ return UnpackFromLayers(dir, artifact)
26
}
27
28
// V0.1 legacy unpacking
0 commit comments