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

Function load_heartcodec_weights

src/models/heartmula/codec.cpp:1274–1293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1272 if (assets_ == nullptr) {
1273 throw std::runtime_error("HeartCodec weights runtime requires assets");
1274 }
1275 if (execution_context_ == nullptr || execution_context_->backend() == nullptr) {
1276 throw std::runtime_error("HeartCodec weights runtime requires initialized execution context");
1277 }
1278 if (execution_context_->config().threads <= 0) {
1279 throw std::runtime_error("HeartCodec weights runtime requires positive thread count");
1280 }
1281 weights_ = std::make_shared<HeartCodecWeights>(
1282 load_heartcodec_weights(
1283 *assets_,
1284 execution_context_->backend(),
1285 execution_context_->backend_type(),
1286 weight_context_bytes,
1287 weight_storage_type));
1288 assets_->codec_weights->release_storage();
1289}
1290
1291HeartCodecWeightsRuntime::~HeartCodecWeightsRuntime() {
1292 scalar_decoder_graph_.reset();
1293 conditioning_graph_.reset();
1294 flow_estimator_graph_.reset();
1295 weights_.reset();
1296}

Callers 1

Calls 4

load_flow_weightsFunction · 0.85
uploadMethod · 0.80
require_assetsFunction · 0.70

Tested by

no test coverage detected