Files
vibepod/server/pyproject.toml
T
Claude bb6da662de Add AMD ROCm GPU support
Introduces a third hardware mode alongside CUDA and CPU: ROCm (AMD GPU).
AMD GPUs present as CUDA devices under PyTorch ROCm, so the existing GPU
path is reused with minimal changes — the main additions are wheel management,
device detection, and suppressing flash_attn (unsupported on ROCm).

- server/vibevoice_server.py: extend _resolve_device() to recognise 'rocm'
  (auto-detected via torch.version.hip); add _torch_device() helper that maps
  'rocm' → 'cuda' for all PyTorch API calls; apply GPU optimisations for both
  cuda and rocm in _init_model(); always use sdpa on ROCm; propagate
  _torch_device() to _load_voice_presets() map_location.
- server/start.sh: add --rocm flag; sync .venv-rocm with uv sync --no-sources
  then replace torch with the ROCm 6.2 wheel via uv pip install; set
  VIBEPOD_DEVICE=rocm for uvicorn.
- server/pyproject.toml: register pytorch-rocm62 index (explicit); add
  .venv-rocm to ruff excludes.
- package.json: add dev:rocm and dev:server:rocm scripts.
- README.md: document ROCm mode, prerequisites (RX 6000+, ROCm 6.2+, Linux),
  and new commands; expand CUDA vs CPU section to CUDA vs CPU vs ROCm.

https://claude.ai/code/session_0168pSswiaoEf6LEx6UQWfBu
2026-05-04 01:54:57 +00:00

67 lines
2.0 KiB
TOML

[project]
name = "vibepod-server"
version = "0.1.0"
description = "VibePod TTS Server — VibeVoice FastAPI backend"
requires-python = ">=3.10"
dependencies = [
# torch is listed explicitly so uv pulls the CUDA wheel (see [tool.uv.sources]).
# To switch back to CPU-only, remove the [tool.uv.sources] torch entry below.
"torch>=2.0.0",
# VibeVoice custom model + processor classes (not yet in upstream transformers)
# Uses JezzWTF/VibeVoice fork so VibePod-specific optimisations land here.
"vibevoice @ git+https://github.com/JezzWTF/VibeVoice.git",
# Exact version required by vibevoice's streaming TTS module
"transformers==4.51.3",
"fastapi>=0.111.0",
"uvicorn[standard]>=0.29.0",
"soundfile>=0.12.1",
"pydantic>=2.7.0",
"huggingface_hub>=0.23.0",
]
[dependency-groups]
dev = [
"ruff>=0.11.0",
]
# No build-system — this is a scripts project, not an installable package.
# Lock file is committed so installs are reproducible.
# Run `uv lock --upgrade` to bump dependencies.
[tool.ruff]
line-length = 100
indent-width = 4
target-version = "py310"
exclude = [".git", ".venv", ".venv-cpu", ".venv-rocm", "__pycache__"]
[tool.ruff.lint]
select = ["E", "F", "UP", "B", "SIM", "I"]
ignore = [
"E501", # line-too-long — handled by formatter
"B905", # zip() without strict= — existing code, lengths are known-correct
]
[tool.ruff.lint.per-file-ignores]
"download_model.py" = ["T201"] # allow print statements in CLI scripts
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
[[tool.uv.index]]
name = "pytorch-rocm62"
url = "https://download.pytorch.org/whl/rocm6.2"
explicit = true
[tool.uv.sources]
# Pull torch from the PyTorch CUDA 12.4 index instead of PyPI's CPU-only wheel.
# CUDA 12.4 runs on any driver >= 525.60 (RTX 30/40 series all qualify).
# To use CPU instead: remove this block and run `uv sync --reinstall-package torch`.
torch = { index = "pytorch-cu124" }