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

Function euler_step_in_place

src/framework/sampling/diffusion_math.cpp:183–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void euler_step_in_place(
184 std::vector<float> & x,
185 const std::vector<float> & velocity,
186 float dt) {
187 if (x.size() < velocity.size()) {
188 throw std::runtime_error("Euler step state/velocity size mismatch");
189 }
190 for (size_t i = 0; i < velocity.size(); ++i) {
191 x[i] -= velocity[i] * dt;
192 }
193}
194
195std::vector<float> denoise_from_velocity(
196 const std::vector<float> & x,

Callers 3

euler_stepFunction · 0.85
subtract_velocity_stepFunction · 0.85
write_x0_prefixFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected