first commit

This commit is contained in:
2026-09-11 01:41:52 +08:00
commit 9f22e6ccae
263 changed files with 28935 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# ============================================================================
# BiRefNet 抠图服务依赖清单
# 安装:pip install -r requirements.txt
#
# 注意 1:PyPI 默认安装的是 CPU 版 torch。
# 如果你的机器有 NVIDIA GPU,请先按 PyTorch 官网命令单独安装对应 CUDA 版 torch,
# 再执行 pip install -r requirements.txt(已安装的 torch/torchvision 会被跳过):
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
#
# 注意 2:模型会自动下载到 HuggingFace 默认缓存目录 ~/.cache/huggingface(走 HF_ENDPOINT 镜像)。
# 首次启动若本地无缓存会联网下载 BiRefNet_lite;之后启动命中本地缓存则完全离线。
# ============================================================================
torch>=2.0.0
torchvision>=0.15.0
transformers>=4.44.0
fastapi>=0.100.0
uvicorn>=0.23.0
pillow>=9.5.0
python-multipart>=0.0.9 # FastAPI 处理 multipart 表单(UploadFile)必需
einops>=0.7.0 # BiRefNet 自定义建模代码(birefnet.py)依赖
kornia>=0.7.0 # BiRefNet 自定义建模代码(birefnet.py)依赖
timm>=0.9.0 # BiRefNet 自定义建模代码(birefnet.py)依赖