| 707 | return modules::ConcatModule({1}).build(ctx, cos_part, sin_part); |
| 708 | } |
| 709 | |
| 710 | core::TensorValue adaln_embedding( |
| 711 | core::ModuleBuildContext & ctx, |
| 712 | const core::TensorValue & timesteps, |
| 713 | const core::TensorValue & freqs, |
| 714 | const HeartCodecAdaLayerNormWeights & weights, |
| 715 | int64_t hidden_size) { |
| 716 | auto embedded = timestep_embedding(ctx, timesteps, freqs); |
| 717 | embedded = modules::LinearModule({512, hidden_size, true, GGML_PREC_F32}).build(ctx, embedded, weights.timestep_linear_1); |
| 718 | embedded = modules::SiluModule{}.build(ctx, embedded); |
| 719 | return modules::LinearModule({hidden_size, hidden_size, true, GGML_PREC_F32}) |
| 720 | .build(ctx, embedded, weights.timestep_linear_2); |
no test coverage detected