Sharing a working setup for the standalone heartlib CLI on Linux + AMD RX 9070 XT (RDNA4 / gfx1201), 16GB, ROCm 7.1, torch 2.14 nightly — a combination I couldn't find documented anywhere (the only existing "ROCm" build is Windows-only, on a 32GB Pro card).
Key finding: on 16GB VRAM the codec must run on CPU (--codec_device cpu). With both backbone and codec on GPU it OOMs at ~15.95 GiB while allocating the KV cache; with the codec on CPU, a 45s clip peaks at ~14.3 GiB and completes.
Getting there needed six small patches, mostly to bridge heartlib against a newer torch/torchtune stack than it targets (the torchtune==0.4.0 vs 0.3.1 split, RoPE cache init/device, a transformers strictness change, and a torchaudio→soundfile save because torchcodec pulls a CUDA lib).
Full write-up with the exact error chain and each fix: https://gist.github.com/asmaurya/89d7aaf91fd05168cafd43a2128d4984.js
Happy to turn any of these into PRs if useful — several are pragmatic hacks rather than clean fixes, so flagging them for discussion first.
Sharing a working setup for the standalone
heartlibCLI on Linux + AMD RX 9070 XT (RDNA4 / gfx1201), 16GB, ROCm 7.1, torch 2.14 nightly — a combination I couldn't find documented anywhere (the only existing "ROCm" build is Windows-only, on a 32GB Pro card).Key finding: on 16GB VRAM the codec must run on CPU (
--codec_device cpu). With both backbone and codec on GPU it OOMs at ~15.95 GiB while allocating the KV cache; with the codec on CPU, a 45s clip peaks at ~14.3 GiB and completes.Getting there needed six small patches, mostly to bridge
heartlibagainst a newer torch/torchtune stack than it targets (thetorchtune==0.4.0vs0.3.1split, RoPE cache init/device, atransformersstrictness change, and atorchaudio→soundfilesave becausetorchcodecpulls a CUDA lib).Full write-up with the exact error chain and each fix: https://gist.github.com/asmaurya/89d7aaf91fd05168cafd43a2128d4984.js
Happy to turn any of these into PRs if useful — several are pragmatic hacks rather than clean fixes, so flagging them for discussion first.