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

Function heun_combine_velocity

src/framework/sampling/diffusion_math.cpp:214–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214std::vector<float> heun_combine_velocity(
215 const std::vector<float> & velocity_first,
216 const std::vector<float> & velocity_second) {
217 require_same_size(velocity_first.size(), velocity_second.size(), "Heun velocity size mismatch");
218 std::vector<float> out(velocity_first.size(), 0.0F);
219 for (size_t i = 0; i < velocity_first.size(); ++i) {
220 out[i] = 0.5F * (velocity_first[i] + velocity_second[i]);
221 }
222 return out;
223}
224
225std::vector<float> heun_step(
226 const std::vector<float> & x_before,

Callers 3

heun_stepFunction · 0.85
generate_latentsMethod · 0.85
test_velocity_and_stepsFunction · 0.85

Calls 2

require_same_sizeFunction · 0.85
sizeMethod · 0.45

Tested by 1

test_velocity_and_stepsFunction · 0.68