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