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

Function validate_config

src/models/vibevoice/diffusion_head.cpp:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36};
37
38void validate_config(const VibeVoiceDiffusionHeadConfig & config) {
39 if (config.hidden_size <= 0 || config.latent_size <= 0 || config.head_layers <= 0) {
40 throw std::runtime_error("VibeVoice diffusion head dimensions must be positive");
41 }
42 if (!(config.head_ffn_ratio > 0.0F)) {
43 throw std::runtime_error("VibeVoice diffusion head FFN ratio must be positive");
44 }
45 if (!(config.rms_norm_eps > 0.0F)) {
46 throw std::runtime_error("VibeVoice diffusion head RMS epsilon must be positive");
47 }
48}
49
50int64_t ffn_dim(const VibeVoiceDiffusionHeadConfig & config) {
51 validate_config(config);

Callers 3

ffn_dimFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected