Background segmentation (blur & replacement) freezes the render thread on Pixel 10 Pro (Tensor G5) — Android SDK 5.6.22

All face/mask/makeup effects work perfectly, but every background-segmentation effect hard-freezes the render thread — the preview stops updating permanently and the app must be force-closed.

Environment

  • DeepAR Android SDK 5.6.22 (ai.deepar.ar:DeepAR:5.6.22)
  • Pixel 10 Pro — Tensor G5, Android 17 (API 37), build CP2A.260805.005
  • Integration: CameraX ImageAnalysis (RGBA_8888, front, mirrored) → receiveFrame(...); render via setRenderSurface() to a SurfaceView. Matches your quickstart-android-java.
  • Manifest has <uses-native-library android:name="libOpenCL.so" android:required="false"/> and libOpenCL-pixel.so.

Reproduces with all three (identical freeze):

  1. switchEffect("effect", ".../galaxy_background.deepar") (background replacement)
  2. the built-in background_blur.deepar via switchEffect
  3. the backgroundBlur(true, 50) API (no effect file)

Logcat the instant a background effect is applied, then the render thread hangs:

I/tflite: Created TensorFlow Lite delegate for GPU.
I/tflite: Loaded OpenCL library with dlopen.
I/tflite: Replacing 175 out of 175 node(s) with delegate (TfLiteGpuDelegateV2) node, yielding 1 partitions for subgraph 0.

It appeared to work once, then began freezing consistently.

Ruled out (all still freeze): clearing app cache/storage; a full device reboot; running the call off the main thread; backgroundBlur() API vs the .deepar file; OpenCL <uses-native-library> present (and, as a test, removed — TFLite then falls through to the ICD loader / GL and still engages the GPU). Latest SDK (5.6.22).

Likely the segmentation model (~175 nodes) on the TFLite GPU/OpenCL delegate hangs the Tensor G5 GPU; face tracking doesn’t hit that path, so it’s fine.

Questions

  1. Is there any way — an init option, an undocumented flag, or a DeepAR Studio per-effect setting — to force CPU inference / disable the GPU delegate for segmentation?
  2. Is the Tensor G5 (Pixel 10 Pro) GPU a known-incompatible target for background segmentation? Is a fix planned?

Seems related to the open thread “switchEffect()/switchEffectWithPath() silently hangs forever on Android — no error, no callback.”