mirror of
https://github.com/neodyland/sbv2-api.git
synced 2026-01-09 07:52:57 +00:00
@@ -14,6 +14,7 @@ serde = { version = "1.0.210", features = ["derive"] }
|
||||
tokio = { version = "1.40.0", features = ["full"] }
|
||||
|
||||
[features]
|
||||
coreml = ["sbv2_core/coreml"]
|
||||
cuda = ["sbv2_core/cuda"]
|
||||
cuda_tf32 = ["sbv2_core/cuda_tf32"]
|
||||
dynamic = ["sbv2_core/dynamic"]
|
||||
|
||||
@@ -99,7 +99,7 @@ impl AppState {
|
||||
continue;
|
||||
}
|
||||
};
|
||||
if let Err(e) = tts_model.load_sbv2file(&entry, sbv2_bytes) {
|
||||
if let Err(e) = tts_model.load_sbv2file(entry, sbv2_bytes) {
|
||||
log::warn!("Error loading {entry}: {e}");
|
||||
};
|
||||
log::info!("Loaded: {entry}");
|
||||
|
||||
@@ -31,3 +31,4 @@ cuda_tf32 = []
|
||||
dynamic = ["ort/load-dynamic"]
|
||||
directml = ["ort/directml"]
|
||||
tensorrt = ["ort/tensorrt"]
|
||||
coreml = ["ort/coreml"]
|
||||
@@ -35,6 +35,10 @@ pub fn load_model<P: AsRef<[u8]>>(model_file: P, bert: bool) -> Result<Session>
|
||||
{
|
||||
exp.push(ort::DirectMLExecutionProvider::default().build());
|
||||
}
|
||||
#[cfg(feature = "coreml")]
|
||||
{
|
||||
exp.push(ort::CoreMLExecutionProvider::default().build());
|
||||
}
|
||||
exp.push(ort::CPUExecutionProvider::default().build());
|
||||
Ok(Session::builder()?
|
||||
.with_execution_providers(exp)?
|
||||
|
||||
Reference in New Issue
Block a user