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

Function bind_component_weights

src/models/miocodec/weights.cpp:521–539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521void bind_component_weights(
522 MioCodecWeights & weights,
523 const engine::assets::TensorSource & source,
524 engine::assets::TensorStorageType storage_type) {
525 weights.local_encoder = bind_transformer(weights, source, "local_encoder", 768, 6, 12, 125, false, 0, std::nullopt, storage_type);
526 weights.local_quantizer = {
527 bind_linear(weights, "local_quantizer.proj_in", 768, 5),
528 bind_linear(weights, "local_quantizer.proj_out", 5, 768),
529 };
530 weights.conv_downsample = bind_conv1d(weights, "conv_downsample", 768, 768, 2, 2);
531 weights.global_encoder = bind_global_encoder(weights);
532 weights.wave_prenet = bind_transformer(weights, source, "wave_prenet", 768, 6, 12, 65, false, 0, 512, storage_type);
533 weights.wave_conv_upsample = bind_conv_transpose1d(weights, "wave_conv_upsample", 512, 512, 2, 2);
534 weights.wave_prior_net = bind_resnet_stack(weights, "wave_prior_net", 512, 2);
535 weights.wave_decoder = bind_transformer(weights, source, "wave_decoder", 512, 8, 8, 65, true, 128, std::nullopt, storage_type);
536 weights.wave_post_net = bind_resnet_stack(weights, "wave_post_net", 512, 2);
537 weights.wave_upsampler = bind_upsampler(weights, source, storage_type);
538 weights.istft_head = {bind_linear(weights, "istft_head.out", 512, 394)};
539}
540
541} // namespace
542

Callers 1

load_miocodec_weightsFunction · 0.85

Calls 7

bind_transformerFunction · 0.85
bind_linearFunction · 0.85
bind_conv1dFunction · 0.85
bind_global_encoderFunction · 0.85
bind_conv_transpose1dFunction · 0.85
bind_resnet_stackFunction · 0.85
bind_upsamplerFunction · 0.85

Tested by

no test coverage detected