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

Function apply_cfg_guidance

src/models/ace_step/diffusion.cpp:610–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608 int64_t padded_tokens,
609 int64_t hidden_size) {
610 if (conditioning.hidden_size != hidden_size || padded_tokens < conditioning.tokens) {
611 throw std::runtime_error("ACE-Step diffusion encoder hidden padding request is invalid");
612 }
613 std::vector<float> padded(static_cast<size_t>(padded_tokens * hidden_size), 0.0F);
614 std::copy(conditioning.values.begin(), conditioning.values.end(), padded.begin());
615 return padded;
616}
617
618std::vector<float> null_encoder_hidden_values(

Callers 1

generate_latentsMethod · 0.85

Calls 1

cfg_guidanceFunction · 0.85

Tested by

no test coverage detected