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

Function load_snake_exact

src/models/ace_step/vae_decoder.cpp:223–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223SnakeExactWeights load_snake_exact(
224 core::BackendWeightStore & store,
225 const assets::TensorSource & source,
226 const std::string & prefix,
227 int64_t channels) {
228 SnakeExactWeights out = {};
229 const auto alpha = source.require_f32(prefix + ".alpha", {1, channels, 1});
230 const auto beta = source.require_f32(prefix + ".beta", {1, channels, 1});
231 out.alpha = store.make_from_f32(
232 core::TensorShape::from_dims({1, channels, 1}),
233 assets::TensorStorageType::F32,
234 snake_exp_transform(alpha));
235 out.beta_inv = store.make_from_f32(
236 core::TensorShape::from_dims({1, channels, 1}),
237 assets::TensorStorageType::F32,
238 snake_inverse_beta_transform(beta));
239 return out;
240}
241
242WeightNormConv1dWeights load_weight_norm_conv1d(
243 core::BackendWeightStore & store,

Callers 3

load_residual_unitFunction · 0.85
load_vae_decoder_weightsFunction · 0.85
load_vae_encoder_weightsFunction · 0.85

Calls 4

snake_exp_transformFunction · 0.85
make_from_f32Method · 0.80
require_f32Method · 0.45

Tested by

no test coverage detected