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

Method Impl

src/models/ace_step/vae_decoder.cpp:742–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740 };
741
742 Impl(
743 std::shared_ptr<const AceStepAssets> assets,
744 core::ExecutionContext & execution,
745 size_t graph_arena_bytes,
746 size_t weight_context_bytes,
747 assets::TensorStorageType weight_storage_type)
748 : assets_(std::move(assets)),
749 backend_(execution.backend()),
750 backend_type_(execution.backend_type()),
751 threads_(std::max(1, execution.config().threads)),
752 graph_arena_bytes_(graph_arena_bytes),
753 weights_(std::make_shared<VAEDecoderWeights>(
754 load_vae_decoder_weights(*assets_, backend_, backend_type_, weight_context_bytes, weight_storage_type))) {
755 if (assets_ == nullptr) {
756 throw std::runtime_error("ACE-Step VAE runtime requires assets");
757 }
758 if (backend_ == nullptr) {
759 throw std::runtime_error("ACE-Step VAE backend is not initialized");
760 }
761 assets_->vae_weights->release_storage();
762 }
763
764 static int64_t decode_direct_frame_limit(core::BackendType backend_type) noexcept {
765 return core::uses_host_graph_plan(backend_type) ? 256 : 512;

Callers

nothing calls this directly

Calls 5

maxFunction · 0.85
load_vae_decoder_weightsFunction · 0.85
backendMethod · 0.45
backend_typeMethod · 0.45
release_storageMethod · 0.45

Tested by

no test coverage detected