Skip to content

fix: add map_location to torch.load in multilingual model for CPU/MPS…#461

Open
Arthur-g-p wants to merge 1 commit intoresemble-ai:masterfrom
Arthur-g-p:fix/multilingual-cpu-map-location
Open

fix: add map_location to torch.load in multilingual model for CPU/MPS…#461
Arthur-g-p wants to merge 1 commit intoresemble-ai:masterfrom
Arthur-g-p:fix/multilingual-cpu-map-location

Conversation

@Arthur-g-p
Copy link
Copy Markdown

Fix: Multilingual model broken on CPU/MPS

Fixes #351

Problem

ChatterboxMultilingualTTS.from_local() calls torch.load() without
map_location, causing a RuntimeError when loading CUDA-saved weights
on a CPU-only or MPS machine.

Fix

Added map_location=torch.device('cpu') for non-CUDA devices, matching
the pattern already used in tts.py's ChatterboxTTS.from_local().

Changes

  • src/chatterbox/mtl_tts.py: Added map_location to torch.load
    calls for ve.pt, s3gen.pt, and conds.pt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CPU support for the multilingual model is broken

1 participant