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

Function resolve_model_root

src/models/demucs/assets.cpp:14–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13HTDemucsManifest parse_package_manifest(const assets::ResourceBundle & resources) {
14 const auto manifest = resources.parse_json("manifest");
15 HTDemucsManifest out;
16 out.model_type = json::require_string(manifest, "model_type");
17 out.name = json::require_string(manifest, "name");
18
19 if (out.model_type == "demucs_single") {
20 (void) manifest.require("model");
21 } else if (out.model_type == "demucs_single_alias") {
22 (void) manifest.require("model");
23 } else if (out.model_type == "demucs_bag") {
24 throw std::runtime_error("HTDemucs package-spec loader currently supports only single-model manifests");
25 } else {

Callers 2

inspect_htdemucs_modelFunction · 0.70
load_htdemucs_assetsFunction · 0.70

Calls 2

is_existing_directoryFunction · 0.85
is_existing_fileFunction · 0.85

Tested by

no test coverage detected