π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Extra error handling around EP cpu fallback
laurenspriem3b780547d4f2
diff --git a/mobile/apps/photos/rust/src/ml/onnx.rs b/mobile/apps/photos/rust/src/ml/onnx.rsindex d390693ba5..09c784b602 100644--- a/mobile/apps/photos/rust/src/ml/onnx.rs+++ b/mobile/apps/photos/rust/src/ml/onnx.rs@@ -34,10 +34,15 @@ pub fn build_session(model_path: &str, policy: &ExecutionProviderPolicy) -> MlReproviders.push(CPUExecutionProvider::default().build());}- if !providers.is_empty() {- builder = builder.with_execution_providers(providers)?;+ if providers.is_empty() {+ return Err(MlError::InvalidRequest(+ "no supported execution provider selected for this platform while CPU fallback is disabled"+ .to_string(),+ ));}+ builder = builder.with_execution_providers(providers)?;+let session = builder.commit_from_file(model_path)?;Ok(session)}