{"record":{"id":"c875a6fe7f5d845a","repo":"abiosoft/colima","slug":"no-gguf-layer-found-in-model-manifest","errorCode":null,"errorMessage":"no GGUF layer found in model manifest","messagePattern":"no GGUF layer found in model manifest","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"model/docker.go","lineNumber":81,"sourceCode":"\n\tvar manifest ociManifest\n\tif err := json.Unmarshal([]byte(output), &manifest); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to parse model manifest: %w\", err)\n\t}\n\n\t// Find the GGUF layer (mediaType contains \"gguf\")\n\tvar blobPath string\n\tfor _, layer := range manifest.Layers {\n\t\tif strings.Contains(layer.MediaType, \"gguf\") {\n\t\t\tif blobHash, ok := strings.CutPrefix(layer.Digest, \"sha256:\"); ok {\n\t\t\t\tblobPath = fmt.Sprintf(\"/models/blobs/sha256/%s\", blobHash)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\tif blobPath == \"\" {\n\t\treturn \"\", fmt.Errorf(\"no GGUF layer found in model manifest\")\n\t}\n\n\t// Create bundle directory and hard-link the blob (same approach as Docker Model Runner)\n\tbundleDir := fmt.Sprintf(\"/models/bundles/sha256/%s/model\", modelHash)\n\tif err := guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\", \"mkdir\", \"-p\", bundleDir); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to create bundle directory: %w\", err)\n\t}\n\n\tif err := guest.RunQuiet(\"docker\", \"exec\", \"docker-model-runner\", \"ln\", blobPath, bundlePath); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to link model file: %w\", err)\n\t}\n\n\treturn bundlePath, nil\n}\n\n// InspectDockerModel returns information about a Docker model.\nfunc InspectDockerModel(modelName string) (*DockerModelInfo, error) {\n\tguest := lima.New(host.New())","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/model/docker.go#L63-L99","documentation":"After parsing the manifest, findGGUFPath scans manifest.Layers for one whose MediaType contains \"gguf\" and whose Digest carries the \"sha256:\" prefix. If no layer matched, blobPath stays empty and this error is returned: the model image contains no GGUF layer (or uses digests this code cannot map to /models/blobs/sha256/<hash>).","triggerScenarios":"Pulling a model shipped as safetensors or another non-GGUF format; a manifest whose layer digests use a different algorithm (no sha256: prefix); a manifest-list/index with no direct GGUF layer entries.","commonSituations":"HuggingFace models that default to safetensors; model variants named identically to GGUF ones but with different artifacts; newer runner manifest layouts.","solutions":["Pick an explicit GGUF variant of the model (e.g. TheBloke GGUF repos on HuggingFace, or *-gguf tags)","Verify what the manifest actually contains: docker exec docker-model-runner cat /models/manifests/sha256/<hash> | jq '.layers[].mediaType'","docker model rm the offending model, pull the GGUF variant, retry serve","Update Docker Model Runner / colima in case the layer mediaType scheme changed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before serving, verify the pulled model carries a GGUF layer.\nfunc manifestHasGGUFLayer(manifestJSON []byte) bool {\n    var m struct{ Layers []struct{ MediaType, Digest string } }\n    _ = json.Unmarshal(manifestJSON, &m)\n    for _, l := range m.Layers {\n        if strings.Contains(l.MediaType, \"gguf\") && strings.HasPrefix(l.Digest, \"sha256:\") {\n            return true\n        }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":"if blobPath == \"\" {\n    return \"\", fmt.Errorf(\"no GGUF layer found in model manifest — pull a GGUF variant of this model\")\n}","preventionTips":["Pull model repos that explicitly ship GGUF artifacts (e.g. TheBloke *-GGUF)","Verify layer mediaTypes with jq after pulling a new model kind","Check modelInfo.Config.Format == \"gguf\" early (ServeDockerModel does) to fail before bundle assembly"],"tags":["gguf","manifest","model-format","layers"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}