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

Function renoise

src/models/ace_step/diffusion.cpp:546–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544 const double fraction = x - floor_value;
545 int64_t rounded = static_cast<int64_t>(floor_value);
546 if (fraction > 0.5) {
547 ++rounded;
548 } else if (fraction == 0.5 && (rounded % 2) != 0) {
549 ++rounded;
550 }
551 return rounded;
552}
553
554std::vector<float> apply_cfg_guidance(
555 const std::vector<float> & pred_cond,
556 const std::vector<float> & pred_uncond,
557 float guidance_scale) {
558 return engine::sampling::cfg_guidance(pred_cond, pred_uncond, guidance_scale);
559}
560
561std::vector<float> apply_apg_guidance(
562 const std::vector<float> & pred_cond,
563 const std::vector<float> & pred_uncond,
564 float guidance_scale,
565 int64_t frames,
566 int64_t channels,

Callers 2

generate_latentsMethod · 0.70
test_velocity_and_stepsFunction · 0.50

Calls 2

gaussian_noiseFunction · 0.85
sizeMethod · 0.45

Tested by 1

test_velocity_and_stepsFunction · 0.40