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

Method Impl

src/models/ace_step/diffusion.cpp:1477–1494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1475 }
1476 const int64_t encoder_token_capacity = std::max<int64_t>(
1477 pre.encoder_hidden_states.tokens,
1478 pre.encoder_hidden_states_non_cover.tokens);
1479 const bool use_diffusion_cfg = !config.is_turbo && options.guidance_scale > 1.0F;
1480 const bool reference_skips_wavelet_dcw = assets_->selection.dit_model_path == "acestep-v15-base";
1481 const int64_t diffusion_batch_size = use_diffusion_cfg ? int64_t{2} : int64_t{1};
1482 if (use_diffusion_cfg && weights_->null_condition_emb_host.empty()) {
1483 throw std::runtime_error("ACE-Step Base CFG requires null_condition_emb");
1484 }
1485 const auto graph_prepare_start = Clock::now();
1486 if (!graph_ ||
1487 graph_->batch_size() != diffusion_batch_size ||
1488 !graph_->can_run(pre.context_latents.frames, encoder_token_capacity)) {
1489 graph_.reset();
1490 graph_ = std::make_unique<StepGraph>(
1491 assets_,
1492 backend_,
1493 backend_type_,
1494 threads_,
1495 weights_,
1496 diffusion_batch_size,
1497 pre.context_latents.frames,

Callers

nothing calls this directly

Calls 4

maxFunction · 0.85
diffusion_weightsMethod · 0.80
backendMethod · 0.45
backend_typeMethod · 0.45

Tested by

no test coverage detected