| 45 | } |
| 46 | |
| 47 | int64_t decoder_graph_latents(const StableAudioConfig & config, int64_t latent_tokens, bool chunked) { |
| 48 | if (chunked && latent_tokens > kSameChunkLatents) { |
| 49 | return kSameChunkLatents; |
| 50 | } |
| 51 | if (!config.medium_architecture && config.same_chunk_midpoint_shift) { |
| 52 | return round_up_to_multiple(latent_tokens, config.pretransform_encoder_chunk_size / config.same_strides.back()); |
| 53 | } |
| 54 | return latent_tokens; |
| 55 | } |
| 56 | |
| 57 | struct GgmlContextDeleter { |
| 58 | void operator()(ggml_context * ctx) const noexcept { |
no test coverage detected