use numr::dtype::DType;
use std::path::PathBuf;
use std::time::Duration;
#[derive(Debug, Clone)]
pub struct VoxCpm2SynthOptions {
pub n_timesteps: usize,
pub cfg_value: f32,
pub min_len: usize,
pub seed: u64,
pub stream_chunk_patches: usize,
pub batch_window: Duration,
pub max_batch: usize,
pub continuous_batching: bool,
pub continuous_capacity: usize,
}
impl Default for VoxCpm2SynthOptions {
fn default() -> Self {
Self {
n_timesteps: 10,
cfg_value: 2.0,
min_len: 2,
seed: 0,
stream_chunk_patches: 4,
batch_window: Duration::from_millis(20),
max_batch: 8,
continuous_batching: true,
continuous_capacity: 1024,
}
}
}
#[derive(Debug, Clone, Default)]
pub struct VoxCpm2LoadOptions {
pub dtype: Option<DType>,
pub vae_decoder_dtype: Option<DType>,
pub synth: VoxCpm2SynthOptions,
pub adapter: Option<PathBuf>,
}