MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / expand_batch_token

Function expand_batch_token

src/models/heartmula/codec.cpp:709–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707 return modules::ConcatModule({1}).build(ctx, cos_part, sin_part);
708}
709
710core::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);

Callers 2

adaptive_block_partsFunction · 0.70

Calls 4

reshape_tensorFunction · 0.85
RepeatModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected