Skip to content

Commit

Permalink
pass self.device to load_fsspec function
Browse files Browse the repository at this point in the history
In case using cuda by default, pass self.device to choose the right device user defined in to() function.
  • Loading branch information
learningpro authored Sep 18, 2023
1 parent f829bf5 commit eff8817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TTS/tts/models/xtts.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def load_checkpoint(
self.init_models()
if eval:
self.gpt.init_gpt_for_inference(kv_cache=self.args.kv_cache)
self.load_state_dict(load_fsspec(model_path)["model"], strict=strict)
self.load_state_dict(load_fsspec(model_path, map_location=self.device)["model"], strict=strict)

if eval:
self.gpt.init_gpt_for_inference(kv_cache=self.args.kv_cache)
Expand Down

0 comments on commit eff8817

Please sign in to comment.