From 38a0dc34cc355dd9ef4f9d24ab1f8017f05a8242 Mon Sep 17 00:00:00 2001 From: lingh Date: Mon, 6 Jul 2026 17:17:25 +0800 Subject: [PATCH] Add configs/cpu-fast.yaml: fp32 CPU lane, no cross-check, no anime-seg Urgent lightweight production profile for a CPU-only fp32 server: base ViTMatte + one BiRefNet@1024, cross-check disabled. Provisions only those two weights (no BiRefNet_HR-matting, no anime-seg) and returns to the ~14-15s/image baseline. Run with BGFILTER_CONFIG=configs/cpu-fast.yaml. Verified end-to-end: loads exactly 2 models, cross_check resolves off, service preloads the primary segmenter and not the cross-checker. Co-Authored-By: Claude Opus 4.8 --- configs/cpu-fast.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 configs/cpu-fast.yaml diff --git a/configs/cpu-fast.yaml b/configs/cpu-fast.yaml new file mode 100644 index 0000000..70332d0 --- /dev/null +++ b/configs/cpu-fast.yaml @@ -0,0 +1,20 @@ +# Urgent CPU-only lane: fp32, birefnet segmentation, NO cross-check, NO anime-seg. +# +# This is the lightest production path: base ViTMatte + one BiRefNet@1024, ~14-15s +# per 1.5 MP image on CPU. It needs ONLY these two weights provisioned -- +# BiRefNet_HR-matting (cross-check) and anime-seg are never loaded. +# +# Anything omitted here inherits the built-in defaults (identical to default.yaml). + +model: + device: cpu + precision: fp32 # fp32 only: this lane targets non-bf16 CPUs + +segmentation: + enabled: true + backend: birefnet # the only backend this lane uses + device: cpu + precision: fp32 + +cross_check: + enabled: false # no second-opinion HR-matting pass (the big cost/mem sink)