| 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, |
nothing calls this directly
no test coverage detected