| 391 | dim, |
| 392 | false); |
| 393 | weights.to_out = load_linear(store, source, prefix + ".to_out", storage_type, dim, dim, false); |
| 394 | weights.q_norm = load_dyt_norm(store, source, prefix + ".q_norm", config.same_dim_heads); |
| 395 | weights.k_norm = load_dyt_norm(store, source, prefix + ".k_norm", config.same_dim_heads); |
| 396 | return weights; |
| 397 | } |
| 398 | |
| 399 | StableAudioSameFeedForwardWeights load_same_ff( |
| 400 | core::BackendWeightStore & store, |
| 401 | const assets::TensorSource & source, |
| 402 | const std::string & prefix, |
| 403 | int64_t dim, |
| 404 | assets::TensorStorageType storage_type) { |
| 405 | StableAudioSameFeedForwardWeights weights; |
| 406 | const int64_t inner = dim * 3; |
| 407 | weights.in_proj = load_linear(store, source, prefix + ".ff.0.proj", storage_type, 2 * inner, dim, true); |
| 408 | weights.out_proj = load_linear(store, source, prefix + ".ff.2", storage_type, dim, inner, true); |
| 409 | return weights; |
| 410 | } |
| 411 | |
| 412 | StableAudioSameTransformerWeights load_same_transformer( |
| 413 | core::BackendWeightStore & store, |
| 414 | const assets::TensorSource & source, |
| 415 | const std::string & prefix, |
| 416 | const StableAudioConfig & config, |
no test coverage detected