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 throw std::runtime_error("ACE-Step diffusion expected a nonnegative value for Python-style rounding");
545 }
546 const double x = static_cast<double>(value);
547 const double floor_value = std::floor(x);
548 const double fraction = x - floor_value;
549 int64_t rounded = static_cast<int64_t>(floor_value);
550 if (fraction > 0.5) {
551 ++rounded;
552 } else if (fraction == 0.5 && (rounded % 2) != 0) {
553 ++rounded;
554 }
555 return rounded;
556}
557
558std::vector<float> apply_cfg_guidance(
559 const std::vector<float> & pred_cond,
560 const std::vector<float> & pred_uncond,
561 float guidance_scale) {
562 return engine::sampling::cfg_guidance(pred_cond, pred_uncond, guidance_scale);
563}
564
565std::vector<float> apply_apg_guidance(
566 const std::vector<float> & pred_cond,

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