Commit Graph
1 Commits
Author SHA1 Message Date
helgehelge123andClaude Opus 5.5 ba6f22567d M12: SAM 3 mask decoder on the GPU (wgpu), and the docs for all of SAM 3 on the GPU
Part 5 of 5 of #2167. The text detector's mask decoder runs on the GPU
device of the image encoder: the prompt cross-attention of the memory (the
DETR attention), the pixel decoder up to 288^2 (the necks' implicit-GEMM 3 x 3
convolution, a two-pass GroupNorm, ReLU), then the mask products. The
instance projection is folded into the 200 mask embeddings on the CPU, and
the semantic projection (#1963) is one more row, so the GPU returns the
per-query masks and the semantic mask in one product. Its weights load on
the first text prompt. The parity test checks the semantic mask too.

docs/gpu-pipeline.md and docs/ai-masks.md describe every part, with the
measured timings and accuracy, and what happens on an adapter that lacks
the limits or whose device can't be created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 20:52:47 +02:00