Runtime for conditional facial-expression editing and face resynthesis — the
FaceEditor / LiveEditSession API used by pyfeat-live,
built on py-feat 2.0. Model weights are
fetched from the py-feat HuggingFace org (py-feat/pyfeat-generator*).
MIT licensed.
pip install pyfeat-generatorPulls py-feat >= 2.0.3 and torch >= 2.12. Model weights download from the
public py-feat HuggingFace org on first use (cached thereafter).
FaceEditor / LiveEditSession run on NVIDIA CUDA, Apple Silicon (MPS), and
CPU. The rasterizer auto-selects a backend for the device; all three are
parity-gated to byte-identical output, so results never depend on the machine.
| Device | Backend | Notes |
|---|---|---|
| NVIDIA CUDA | nvdiffrast |
Fastest. Optional — pip install nvdiffrast separately (needs the CUDA toolkit). Falls back to torch if absent. |
| Apple Silicon (MPS) | metal |
Fused torch.mps.compile_shader kernel. Requires torch ≥ 2.12 (this package's floor); older torch falls back to torch. |
| CPU / other | torch |
Pure-PyTorch, device-agnostic. Always works; slowest. |
nvdiffrast is never imported off CUDA (the auto-selector guards it behind
torch.cuda.is_available()), so it is not a dependency and is not needed on a
Mac. Force a backend with the env var AU_RASTER_BACKEND=nvdiffrast|metal|torch.