| 146 | } // namespace |
| 147 | |
| 148 | AceStepSession::AceStepSession(runtime::TaskSpec task, runtime::SessionOptions options, |
| 149 | std::shared_ptr<const AceStepAssets> assets) |
| 150 | : RuntimeSessionBase(options), |
| 151 | task_(task), |
| 152 | assets_(require_assets(std::move(assets))), |
| 153 | planner_weight_storage_type_( |
| 154 | weight_type_from_options(RuntimeSessionBase::options(), "ace_step.planner_weight_type")), |
| 155 | text_encoder_weight_storage_type_( |
| 156 | weight_type_from_options(RuntimeSessionBase::options(), "ace_step.text_encoder_weight_type")), |
| 157 | dit_weight_storage_type_(dit_weight_type_from_options(RuntimeSessionBase::options())), |
| 158 | vae_weight_storage_type_(weight_type_from_options(RuntimeSessionBase::options(), "ace_step.vae_weight_type")), |
| 159 | mem_saver_(mem_saver_from_options(RuntimeSessionBase::options())) { |
| 160 | if (task_.task != runtime::VoiceTaskKind::AudioGeneration) { |
| 161 | throw std::runtime_error("ACE-Step supports only the gen task"); |
| 162 | } |
| 163 | if (task_.mode != runtime::RunMode::Offline) { |
| 164 | throw std::runtime_error("ACE-Step currently supports offline sessions only"); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | std::string AceStepSession::family() const { |
| 169 | return "ace_step"; |
nothing calls this directly
no test coverage detected