Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Temporarily disable coreml on rust ml side

laurensprieme8a61eab6253
diff --git a/mobile/apps/photos/ios/Podfile.lock b/mobile/apps/photos/ios/Podfile.lock
index d74e766b18..8896f1c714 100644
--- a/mobile/apps/photos/ios/Podfile.lock
+++ b/mobile/apps/photos/ios/Podfile.lock
@@ -215,28 +215,31 @@ PODS:
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- - sqlite3 (3.50.4):
- - sqlite3/common (= 3.50.4)
- - sqlite3/common (3.50.4)
- - sqlite3/dbstatvtab (3.50.4):
+ - sqlite3 (3.51.1):
+ - sqlite3/common (= 3.51.1)
+ - sqlite3/common (3.51.1)
+ - sqlite3/dbstatvtab (3.51.1):
- sqlite3/common
- - sqlite3/fts5 (3.50.4):
+ - sqlite3/fts5 (3.51.1):
- sqlite3/common
- - sqlite3/math (3.50.4):
+ - sqlite3/math (3.51.1):
- sqlite3/common
- - sqlite3/perf-threadsafe (3.50.4):
+ - sqlite3/perf-threadsafe (3.51.1):
- sqlite3/common
- - sqlite3/rtree (3.50.4):
+ - sqlite3/rtree (3.51.1):
+ - sqlite3/common
+ - sqlite3/session (3.51.1):
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- FlutterMacOS
- - sqlite3 (~> 3.50.1)
+ - sqlite3 (~> 3.51.1)
- sqlite3/dbstatvtab
- sqlite3/fts5
- sqlite3/math
- sqlite3/perf-threadsafe
- sqlite3/rtree
+ - sqlite3/session
- system_info_plus (0.0.1):
- Flutter
- thermal (0.0.1):
@@ -550,8 +553,8 @@ SPEC CHECKSUMS:
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
- sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b
- sqlite3_flutter_libs: e7fc8c9ea2200ff3271f08f127842131746b70e2
+ sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b
+ sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41
system_info_plus: 555ce7047fbbf29154726db942ae785c29211740
thermal: d4c48be750d1ddbab36b0e2dcb2471531bc8df41
ua_client_hints: 92fe0d139619b73ec9fcb46cc7e079a26178f586
diff --git a/mobile/apps/photos/rust/Cargo.toml b/mobile/apps/photos/rust/Cargo.toml
index 127b7d0d91..d8a81bb0bd 100644
--- a/mobile/apps/photos/rust/Cargo.toml
+++ b/mobile/apps/photos/rust/Cargo.toml
@@ -25,7 +25,10 @@ thiserror = "2.0.11"
[target.'cfg(target_os = "ios")'.dependencies]
ort = { version = "=2.0.0-rc.4", default-features = false, features = [
"ndarray",
- "coreml",
+ # Temporarily disabled to avoid iOS duplicate ObjC class collisions
+ # when both Dart ONNXRuntime and Rust ONNXRuntime are linked.
+ # Re-enable once we move to a single shared ORT runtime.
+ # "coreml",
"xnnpack",
] }
diff --git a/mobile/apps/photos/rust/src/ml/onnx.rs b/mobile/apps/photos/rust/src/ml/onnx.rs
index 194334f364..4bf4471d61 100644
--- a/mobile/apps/photos/rust/src/ml/onnx.rs
+++ b/mobile/apps/photos/rust/src/ml/onnx.rs
@@ -3,8 +3,11 @@ use ort::{
XNNPACKExecutionProvider,
};
-#[cfg(target_vendor = "apple")]
-use ort::CoreMLExecutionProvider;
+// Temporarily disabled on Rust side to avoid iOS duplicate ObjC class collisions
+// (`CoreMLExecution`) while Dart ONNXRuntime is still linked in production.
+// Re-enable once iOS uses a single shared ORT runtime.
+// #[cfg(target_vendor = "apple")]
+// use ort::CoreMLExecutionProvider;
#[cfg(target_os = "android")]
use ort::NNAPIExecutionProvider;
@@ -64,10 +67,11 @@ fn providers_for_policy(
) -> Vec<ExecutionProviderDispatch> {
let mut providers: Vec<ExecutionProviderDispatch> = Vec::new();
- #[cfg(target_vendor = "apple")]
- if policy.prefer_coreml {
- providers.push(CoreMLExecutionProvider::default().build());
- }
+ // Temporarily disabled on Rust side. Keep this block for easy re-enable.
+ // #[cfg(target_vendor = "apple")]
+ // if policy.prefer_coreml {
+ // providers.push(CoreMLExecutionProvider::default().build());
+ // }
#[cfg(target_os = "android")]
if policy.prefer_nnapi {