Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix(redact): detect 512² input so rfdetr_v11 actually runs (was 384 fallback)

Louis Beaumont7c9eb2c888db
diff --git a/Cargo.lock b/Cargo.lock
index cf27d3673..067d08f76 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8070,7 +8070,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"audiopipe",
@@ -8132,7 +8132,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio-eval"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"audiopipe",
@@ -8170,7 +8170,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -8183,7 +8183,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"async-trait",
@@ -8208,6 +8208,7 @@ dependencies = [
"serde",
"serde_json",
"sha2 0.10.9",
+ "specta",
"sqlx",
"tempfile",
"thiserror 1.0.69",
@@ -8220,7 +8221,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -8272,7 +8273,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"chrono",
@@ -8298,7 +8299,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"arc-swap",
@@ -8374,7 +8375,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"chrono",
@@ -8392,7 +8393,7 @@ dependencies = [
[[package]]
name = "screenpipe-meeting-eval"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"clap",
@@ -8404,7 +8405,7 @@ dependencies = [
[[package]]
name = "screenpipe-redact"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"anyhow",
"async-trait",
@@ -8434,7 +8435,7 @@ dependencies = [
[[package]]
name = "screenpipe-rfdetr-mlx"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"image",
"mlx-rs",
@@ -8445,7 +8446,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -8503,7 +8504,7 @@ dependencies = [
[[package]]
name = "screenpipe-sync"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"async-trait",
"base64 0.22.1",
@@ -8525,7 +8526,7 @@ dependencies = [
[[package]]
name = "screenpipe-team-memory"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"serde",
"serde_yaml",
@@ -8534,7 +8535,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.350"
+version = "0.3.351"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/crates/screenpipe-redact/src/adapters/rfdetr.rs b/crates/screenpipe-redact/src/adapters/rfdetr.rs
index 4cd14c766..c841d3ec1 100644
--- a/crates/screenpipe-redact/src/adapters/rfdetr.rs
+++ b/crates/screenpipe-redact/src/adapters/rfdetr.rs
@@ -418,8 +418,12 @@ mod imp {
// the last dim, fall back to None if it isn't a static int.
let shape = &session.inputs.first()?.input_type;
let s = format!("{shape:?}");
- // Cheap parse: look for "320" or "384" suffix in the shape.
- [320u32, 384]
+ // Cheap parse: look for a known square size in the shape.
+ // Keep this in sync with every shipped model: v8=320, v9=384,
+ // v11=512. Omitting the current model's size makes detection
+ // fall back to 384 and feed a wrong-sized tensor → ort "invalid
+ // dimensions for input" on every frame (silent redaction outage).
+ [320u32, 384, 512]
.into_iter()
.find(|cand| s.contains(&cand.to_string()))
}