| 519 | } |
| 520 | |
| 521 | void 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 |
no test coverage detected