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

Function duplicate_batch_values

src/models/ace_step/diffusion.cpp:692–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690 }
691 const size_t offset = frame * static_cast<size_t>(channels);
692 for (int64_t channel = 0; channel < channels; ++channel) {
693 const size_t index = offset + static_cast<size_t>(channel);
694 hidden[index] = next_timestep * noise[index] + (1.0F - next_timestep) * clean_src_latents[index];
695 }
696 }
697}
698
699std::vector<float> build_soft_repaint_mask(const std::vector<int32_t> & repaint_mask, int64_t crossfade_frames) {
700 return engine::sampling::build_soft_mask(repaint_mask, crossfade_frames);
701}
702
703void apply_repaint_boundary_blend(
704 std::vector<float> & generated,
705 const std::vector<float> & clean_src_latents,
706 const std::vector<int32_t> & repaint_mask,
707 int64_t crossfade_frames,
708 int64_t channels) {

Callers 2

set_static_inputsMethod · 0.85
generate_latentsMethod · 0.85

Calls 3

sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected