Skip to content

Commit 104f37f

Browse files
committed
Rename init_model_from_another_checkpoint to restore_from_pretrained_checkpoint
Signed-off-by: Edresson Casanova <[email protected]>
1 parent f9cff53 commit 104f37f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nemo/collections/speechlm2/models/duplex_ear_tts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ def __init__(self, cfg: dict) -> None:
491491
self._use_fsdp = False
492492
self._use_tp = False
493493
if self.cfg.get("pretrained_model", None):
494-
self.init_model_from_another_checkpoint(self.cfg.pretrained_model)
494+
self.restore_from_pretrained_checkpoint(self.cfg.pretrained_model)
495495

496496
def get_codec_silence_frame_last_one(self):
497497
audio = torch.zeros(1, 10 * self.target_sample_rate).float().to(self.device)
@@ -564,9 +564,9 @@ def _load_language_model(self, cfg):
564564
language_model = None
565565
return language_model
566566

567-
def init_model_from_another_checkpoint(self, checkpoint_path):
567+
def restore_from_pretrained_checkpoint(self, checkpoint_path):
568568
"""
569-
Loads model weights and config from another checkpoint file, supporting .nemo and PyTorch formats.
569+
Loads model weights a pretrained checkpoint file, supporting partial loading from .nemo and PyTorch formats.
570570
571571
Args:
572572
checkpoint_path (str): Path to checkpoint file.

0 commit comments

Comments
 (0)