28d3fe8842
scripts/deploy_autodl.sh: idempotent setup for an AutoDL box -- installs app deps (keeping the image's CUDA torch), picks the cupy wheel from torch's CUDA version for GPU foreground, fetches weights, writes the auth token, renders a supervisord instance (crash auto-restart) + a ~/.bashrc login autostart, then starts the service and waits for /healthz. Args: --token, --port (default 6006), --config (default configs/gpu.yaml). configs/gpu.yaml: the GPU lane (CUDA + bf16, full pipeline with cross-check, despill off) promoted from a box-local file into the repo so the deploy is reproducible. The public port mapping and the "no auto-start without an interactive login" gap are AutoDL platform limits, documented at the top of the script. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
# GPU lane: CUDA + bf16 across all three models. Full pipeline (BiRefNet seg +
|
|
# ViTMatte + HR-matting cross-check). Foreground estimation auto-uses the CuPy GPU
|
|
# backend when cupy is installed (see foreground.use_gpu, default on). despill is
|
|
# off (it false-positives on subjects sharing the background hue).
|
|
screen_color: null
|
|
|
|
model:
|
|
model_name: hustvl/vitmatte-base-composition-1k
|
|
device: cuda
|
|
matting_method: vitmatte
|
|
fallback_to_chroma_alpha: false
|
|
precision: bf16
|
|
attn_query_chunk: 2048
|
|
|
|
segmentation:
|
|
enabled: true
|
|
backend: birefnet
|
|
model_name: ZhengPeng7/BiRefNet
|
|
device: cuda
|
|
input_size: 1024
|
|
precision: bf16
|
|
|
|
trimap:
|
|
sure_bg_threshold: 0.92
|
|
sure_fg_threshold: 0.12
|
|
unknown_radius_ratio: 0.012
|
|
fg_safe_radius_ratio: 0.006
|
|
seg_core_threshold: 0.60
|
|
seg_loose_threshold: 0.08
|
|
mode: directional
|
|
seg_low: 0.15
|
|
bg_hue_proj_min: 4.0
|
|
seg_force_fg: 0.98
|
|
|
|
alpha_post:
|
|
chroma_suppress: true
|
|
chroma_suppress_bg_low: 0.35
|
|
chroma_suppress_bg_high: 0.80
|
|
chroma_suppress_strength: 1.0
|
|
suppress_raw_lo: 0.85
|
|
suppress_raw_hi: 0.98
|
|
|
|
cross_check:
|
|
enabled: true
|
|
model_name: ZhengPeng7/BiRefNet_HR-matting
|
|
input_size: 2048
|
|
reuse_as_seg: false
|
|
precision: bf16
|
|
proj_min: 3.0
|
|
l_min: 45.0
|
|
feather_sigma: 2.0
|
|
gate_lo: 0.70
|
|
gate_hi: 0.95
|
|
|
|
foreground:
|
|
enabled: true
|
|
method: ml
|
|
ml_regularization: 0.00001
|
|
|
|
despill:
|
|
enabled: false
|