Drop dead detect_background_color; sync docs with landed optimizations

- chroma.py: remove detect_background_color — orphaned since auto-detection
  goes through estimate_background_model -> _background_border_cluster;
  nothing in the repo calls it.
- settings.py: fix stale "Segmentation always stays fp32" comment
  (--precision now fans out to the BiRefNet models too).
- README: add a measured CPU performance section (9700X reference numbers,
  memory ceiling explanation, Zen 2 fallback guidance).
- docs/hair_gap_artifacts.md: record that the cross-check cost note is
  obsolete — reuse_as_seg returns the net model count to 2, bf16 and
  chunked attention absorb the rest.
- docs/green_screen_matting_workflow.md: add the 2026-07 additions to the
  architecture-evolution note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 15:45:06 +08:00
parent 2cc0ce8684
commit 10134ad492
5 changed files with 33 additions and 20 deletions
+4 -4
View File
@@ -129,10 +129,10 @@ class ModelSettings:
matting_method: str = "vitmatte"
fallback_to_chroma_alpha: bool = False
# ViTMatte compute precision: "fp32" or "bf16". bf16 halves the matting
# model's activation memory (its full-resolution attention is the pipeline's
# memory peak) with visually identical alpha, but needs bf16-capable
# hardware (any modern GPU, or a CPU with AVX512-BF16/AMX) — otherwise it
# falls back to fp32 with a warning. Segmentation always stays fp32.
# model's activation memory with visually identical alpha, but needs
# bf16-capable hardware (any modern GPU, or a CPU with AVX512-BF16/AMX) —
# otherwise it falls back to fp32 with a warning. The BiRefNet models have
# their own precision fields; --precision sets all of them at once.
precision: str = "fp32"
# Query-chunked global attention (exact math, bitwise-identical output):
# the VitDet backbone's 4 global blocks materialize an N^2 attention map —