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

Function load_same_attention

src/models/stable_audio/same_autoencoder.cpp:393–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
399StableAudioSameFeedForwardWeights 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
412StableAudioSameTransformerWeights load_same_transformer(
413 core::BackendWeightStore & store,
414 const assets::TensorSource & source,
415 const std::string & prefix,
416 const StableAudioConfig & config,

Callers 1

load_same_transformerFunction · 0.85

Calls 2

load_dyt_normFunction · 0.85
load_linearFunction · 0.70

Tested by

no test coverage detected