# Isolated venv for MuseTalk (Tencent Music Entertainment Lyra Lab).
#
# Separate for the same reason as LatentSync: it pins diffusers 0.30 and numpy
# 1.x, and it needs mmpose, whose mmcv extension is built against one exact torch
# build. coderai drives scripts.inference as a subprocess
# (codai/api/lipsync_engines.py). Do NOT merge these into requirements.txt.
#
# python 3.11 — mmcv publishes no wheel for 3.13, and numpy 1.23 none either.
#
# Two notes on what is NOT here. Upstream's requirements.txt lists
# tensorflow==2.12.0 and tensorboard: nothing reachable from scripts.inference
# imports either, and they are ~600 MB. It also lists gdown, only used by
# download_weights.sh to pull the BiSeNet face-parsing checkpoint off a Google
# Drive id; coderai takes that file from a Hub mirror instead.
#
# The torch pin is dictated by mmcv, not by MuseTalk. mmpose's RTMO head
# imports mmdet unconditionally, mmdet asserts mmcv < 2.2.0 at import time, and
# openmmlab publishes a cp311 wheel for mmcv 2.1.0 on exactly one index:
# cu121/torch2.1. Every other index it publishes has 2.2.0 only. So torch 2.1.2
# it is -- which diffusers 0.30 and transformers 4.39 are contemporaries of
# anyway. Moving torch up here means building mmcv from source against nvcc.

--extra-index-url https://download.pytorch.org/whl/cu121
torch==2.1.2+cu121
torchvision==0.16.2+cu121

diffusers==0.30.2
transformers==4.39.2
accelerate==0.28.0
huggingface-hub==0.30.2

numpy==1.23.5
opencv-python==4.9.0.80
soundfile==0.12.1
librosa==0.11.0
einops==0.8.1
omegaconf
tqdm>=4.66.0
imageio[ffmpeg]
ffmpeg-python
requests

# DWPose landmarks. preprocessing.py calls mmpose.apis at import time, so these
# are not optional -- and neither is mmdet: mmpose lists it as optional but
# models/heads/hybrid_heads/rtmo_head.py imports it unconditionally, so
# `import mmpose.apis` dies with ModuleNotFoundError without it.
-f https://download.openmmlab.com/mmcv/dist/cu121/torch2.1/index.html
mmcv==2.1.0
mmengine>=0.10.3
mmpose==1.3.2
mmdet==3.3.0

# mmengine.utils.package_utils imports pkg_resources to locate mmpose's config
# directory, and setuptools dropped pkg_resources in 81. It is a RUNTIME
# dependency here, not a build one, so it has to be pinned rather than left to
# whatever the venv was seeded with.
setuptools<81
