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

Method tensors

src/models/vibevoice/assets.cpp:270–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 assets::require_tensor_shape(
269 weights,
270 "model.semantic_tokenizer.encoder.downsample_layers.0.0.conv.conv.weight",
271 {config.semantic_tokenizer.encoder_n_filters, config.semantic_tokenizer.channels, 7});
272}
273
274float require_scalar_f32(const assets::TensorSource & source, const std::string & name) {
275 const auto tensor = source.require_tensor_data(name);
276 if (!tensor.metadata.shape.empty()) {
277 throw std::runtime_error("VibeVoice tensor must be scalar: " + name);
278 }
279 const auto storage_type = assets::tensor_storage_type_for_dtype(tensor.metadata.dtype);
280 float value = 0.0F;
281 switch (storage_type) {
282 case assets::TensorStorageType::F32:
283 if (tensor.bytes.size() != sizeof(float)) {

Callers 4

load_miocodec_weightsFunction · 0.45
mainFunction · 0.45

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected