| 28 | const auto & decoder_config = pretransform_config.require("decoder").require("config"); |
| 29 | if (pretransform_config.find("pretransform") == nullptr) { |
| 30 | throw std::runtime_error("stable_audio supports Stable Audio 3; Foundation-1 / Open 1.0 support has been removed"); |
| 31 | } |
| 32 | config.pretransform_patch_size = |
| 33 | json::require_i64(pretransform_config.require("pretransform").require("config"), "patch_size"); |
| 34 | config.pretransform_encoder_chunk_size = json::optional_i64(encoder_config, "chunk_size", 32); |
| 35 | const auto & encoder_strides = encoder_config.require("strides").as_array(); |
| 36 | if (encoder_strides.empty()) { |
| 37 | throw std::runtime_error("Stable Audio pretransform encoder strides must not be empty"); |
| 38 | } |
no test coverage detected