preferredVisionBackend property

PreferredBackend? preferredVisionBackend
final

Backend for the VISION encoder, independent of preferredBackend (the text/decoder backend). Null defaults to CPU in the LiteRT-LM engine, because the vision encoder's STABLEHLO_COMPOSITE ops fail to prepare on the Metal/WebGPU delegates (LiteRT-LM#2461). Set it (e.g. to PreferredBackend.gpu) only for a model whose vision section bakes a gpu-only backend_constraint. Ignored by the MediaPipe engine (whole-model backend, no per-encoder split).

Implementation

final PreferredBackend? preferredVisionBackend;