| 21 | using Clock = std::chrono::steady_clock; |
| 22 | |
| 23 | std::shared_ptr<const StableAudioAssets> require_assets(std::shared_ptr<const StableAudioAssets> assets) { |
| 24 | if (assets == nullptr) { |
| 25 | throw std::runtime_error("Stable Audio Foundation session requires assets"); |
| 26 | } |
| 27 | return assets; |
| 28 | } |
| 29 | |
| 30 | void validate_weight_storage(engine::assets::TensorStorageType storage_type, const char * option_name) { |
| 31 | if (storage_type == engine::assets::TensorStorageType::Native || |