feat: remove gpu support and simplify to cpu-only
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m13s

This commit is contained in:
2026-02-19 12:50:10 +01:00
parent 0fe96a9615
commit 58445340c8
12 changed files with 21 additions and 190 deletions

View File

@@ -2,7 +2,7 @@
## Overview
FaceFusion API - A Python REST API wrapping FaceFusion v3.5.3 for face swapping, enhancement, lip sync, and other face/frame processing. Containerized with CUDA GPU support, deployed via Gitea CI/CD at `dev.pivoine.art`.
FaceFusion API - A Python REST API wrapping FaceFusion v3.5.3 for face swapping, enhancement, lip sync, and other face/frame processing. Containerized for CPU-only execution, deployed via Gitea CI/CD at `dev.pivoine.art`.
## Architecture
@@ -43,9 +43,6 @@ docker compose up
# Production (CPU VPS)
docker compose -f docker-compose.prod.yml up -d
# Production (GPU server)
docker compose -f docker-compose.gpu.yml up -d
# Test endpoints
curl http://localhost:8000/api/v1/health
curl http://localhost:8000/api/v1/system
@@ -69,19 +66,18 @@ curl -X POST http://localhost:8000/api/v1/process \
- `GET /api/v1/models` - List downloaded models
- `POST /api/v1/models/download` - Download models
- `GET /api/v1/health` - Health check
- `GET /api/v1/system` - System info (GPU, memory)
- `GET /api/v1/system` - System info (CPU, memory)
## Docker
- `VARIANT=cpu` (default): `python:3.12-slim` + `onnxruntime`
- `VARIANT=gpu`: `nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04` + `onnxruntime-gpu`
- Base image: `python:3.12-slim` + `onnxruntime`
- Models persisted in `/data/models` Docker volume (not baked into image)
- Single worker mandatory (`--workers 1`)
## Environment Variables
All prefixed with `FF_`:
- `FF_EXECUTION_PROVIDERS` - JSON array, e.g. `["cuda","cpu"]`
- `FF_EXECUTION_PROVIDERS` - JSON array, e.g. `["cpu"]`
- `FF_EXECUTION_THREAD_COUNT` - Default 4
- `FF_VIDEO_MEMORY_STRATEGY` - strict/moderate/tolerant
- `FF_MODELS_DIR` - Model storage path
@@ -91,5 +87,5 @@ All prefixed with `FF_`:
- Never run with multiple uvicorn workers - FaceFusion global state will corrupt
- Models are 100MB-1GB each; pre-download via `/api/v1/models/download` before processing
- The `facefusion/` submodule must not be modified - use symlinks for model paths
- The `facefusion/` submodule should not be modified directly if possible - use symlinks for model paths
- Git operations: always push with the valknarthing ssh key