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

Function expand_conditioning

src/models/ace_step/diffusion.cpp:243–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241 core::ModuleBuildContext & ctx,
242 const core::TensorValue & input,
243 const modules::LinearWeights & gate_proj,
244 const modules::LinearWeights & up_proj,
245 const modules::LinearWeights & down_proj,
246 const AceStepDiffusionConfig & config) {
247 auto gate = modules::LinearModule({config.hidden_size, config.intermediate_size, false, GGML_PREC_F32})
248 .build(ctx, input, gate_proj);
249 gate = modules::SiluModule{}.build(ctx, gate);
250 auto up = modules::LinearModule({config.hidden_size, config.intermediate_size, false, GGML_PREC_F32})
251 .build(ctx, input, up_proj);
252 auto ff = modules::MulModule{}.build(ctx, gate, up);
253 return modules::LinearModule({config.intermediate_size, config.hidden_size, false, GGML_PREC_F32})
254 .build(ctx, ff, down_proj);
255}
256

Callers 2

slice_conditioning_planeFunction · 0.85
buildMethod · 0.85

Calls 3

reshape_tensorFunction · 0.85
RepeatModuleClass · 0.85
buildMethod · 0.45

Tested by

no test coverage detected