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

Method AceStepSession

src/models/ace_step/session.cpp:148–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146} // namespace
147
148AceStepSession::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
168std::string AceStepSession::family() const {
169 return "ace_step";

Callers

nothing calls this directly

Calls 4

weight_type_from_optionsFunction · 0.85
require_assetsFunction · 0.70
mem_saver_from_optionsFunction · 0.70

Tested by

no test coverage detected