#pragma once #include "engine/framework/assets/tensor_source.h" #include "engine/framework/core/backend.h" #include "engine/models/audiosr/assets.h" #include #include namespace engine::models::audiosr { struct AudioSRLatent { std::vector values; int64_t channels = 0; int64_t height = 0; int64_t width = 0; }; class AudioSRAutoencoderRuntime { public: AudioSRAutoencoderRuntime( std::shared_ptr assets, engine::core::ExecutionContext & execution, engine::assets::TensorStorageType weight_type); ~AudioSRAutoencoderRuntime(); AudioSRLatent encode_condition(const std::vector & mel, int64_t frames, uint32_t seed); std::vector decode_first_stage(const AudioSRLatent & latent); void release_encoder_graph(); void release_decoder_graph(); void release_runtime_graphs(); private: struct Impl; std::unique_ptr impl_; }; } // namespace engine::models::audiosr