| 36 | }; |
| 37 | |
| 38 | void 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 | |
| 50 | int64_t ffn_dim(const VibeVoiceDiffusionHeadConfig & config) { |
| 51 | validate_config(config); |
no outgoing calls
no test coverage detected