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

Function repeat_codes_to_length

src/models/heartmula/codec.cpp:1446–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1444 out.begin() + static_cast<std::ptrdiff_t>(q * length));
1445 }
1446 return out;
1447}
1448
1449void apply_inactive_conditioning(
1450 std::vector<float> & mu,
1451 int64_t frames,
1452 int64_t dim,
1453 int64_t latent_length,
1454 const std::vector<float> & zero_cond) {
1455 if (static_cast<int64_t>(mu.size()) != frames * dim || static_cast<int64_t>(zero_cond.size()) != dim) {
1456 throw std::runtime_error("HeartCodec conditioning mask shape mismatch");
1457 }
1458 for (int64_t t = latent_length; t < frames; ++t) {
1459 std::copy(
1460 zero_cond.begin(),
1461 zero_cond.end(),
1462 mu.begin() + static_cast<std::ptrdiff_t>(t * dim));
1463 }
1464}
1465
1466std::vector<float> make_flow_input(

Callers 1

detokenize_codesMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected