vnassets/background: add bg removal via rembg + isnet-anime

rembg with ONNX Runtime on CPU was chosen over BiRefNet: the latter
requires deform_conv2d which crashes on ROCm bfloat16 and runs at 40s
in float32. rembg delivers 0.23s per 1024x1024 image, no GPU deps,
and isnet-anime is trained specifically on anime images — exactly the
target domain.

CLI and session API both support single-image and batch (plural-first)
modes, reusing one model session across files.
This commit is contained in:
Michele Rossi
2026-07-08 11:20:36 +02:00
parent d33f3a4e34
commit 8a11325b2f
5 changed files with 236 additions and 3 deletions

View File

@@ -16,6 +16,8 @@ dependencies = [
"pyyaml",
"click",
"compel",
"rembg",
"onnxruntime",
]
[tool.setuptools.packages.find]