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

Function pad_latent_values

src/models/ace_step/diffusion.cpp:646–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646std::vector<float> duplicate_batch_values(const std::vector<float> & values, int64_t batch_size) {
647 if (batch_size <= 0) {
648 throw std::runtime_error("ACE-Step diffusion batch size is invalid");
649 }
650 if (batch_size == 1) {
651 return values;
652 }
653 std::vector<float> out;
654 out.reserve(values.size() * static_cast<size_t>(batch_size));
655 for (int64_t batch = 0; batch < batch_size; ++batch) {
656 out.insert(out.end(), values.begin(), values.end());

Callers 1

pad_context_valuesFunction · 0.85

Calls 3

copyFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected