dot-detect_model_type_gguf: Detect model type from a GGUF file's KV metadata (header-only...

.detect_model_type_ggufR Documentation

Detect model type from a GGUF file's KV metadata (header-only probe)

Description

Reads general.architecture (and a few related KV keys) from a GGUF header WITHOUT loading tensor weights, via ggmlR::gguf_load(path, meta_only = TRUE) (no_alloc header read). Cheap even on multi-GB Flux models.

Usage

.detect_model_type_gguf(path)

Arguments

path

Path to a .gguf file

Details

Note: stable-diffusion.cpp itself detects the version from tensor names/shapes, not from general.architecture, so many diffusion GGUFs (e.g. quantized Flux converters) leave that field empty or set it to a sub-component name (e.g. "t5" for a packed text encoder). This probe is therefore best-effort: it returns a concrete type only on a confident match and otherwise NULL, so the caller falls through to config.json / filename detection.

Value

Model type string, or NULL if unavailable / inconclusive


sd2R documentation built on June 19, 2026, 9:08 a.m.