MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / resolve_model_root

Function resolve_model_root

src/models/stable_audio/loader.cpp:15–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13std::string variant(const StableAudioAssets & assets) {
14 const auto name = assets.resources.model_root().filename().string();
15 if (name.rfind("stable-audio-3-", 0) == 0) {
16 return name.substr(std::string("stable-audio-3-").size());
17 }
18 return assets.config.medium_architecture ? "medium" : "small";
19}
20
21runtime::ModelMetadata metadata(const StableAudioAssets & assets) {
22 runtime::ModelMetadata out;
23 out.family = "stable_audio";
24 out.variant = variant(assets);
25 out.description = "Stable Audio 3 loaded from local safetensors and config-declared prompt encoder assets.";
26 return out;

Callers 5

discover_config_assetsFunction · 0.70
discover_weight_assetsFunction · 0.70
can_loadMethod · 0.70
inspectMethod · 0.70
loadMethod · 0.70

Calls 2

is_existing_directoryFunction · 0.85
is_existing_fileFunction · 0.85

Tested by

no test coverage detected