Describe the bug
As title, or see below
Steps/Code to reproduce bug
in a python interpreter (via uv run python):
>>> from nemo.collections.tts.models import MagpieTTSModel
OneLogger: Setting error_handling_strategy to DISABLE_QUIETLY_AND_REPORT_METRIC_ERROR for rank (rank=0) with OneLogger disabled. To override: explicitly set error_handling_strategy parameter.
No exporters were provided. This means that no telemetry data will be collected.
>>> model = MagpieTTSModel.from_pretrained("nvidia/magpie_tts_multilingual_357m")
<intermediate log omitted>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mrnas04/internal/wenchin-h/Experiments/NeMo/nemo/core/classes/common.py", line 876, in from_pretrained
instance = class_.restore_from(
File "/mrnas04/internal/wenchin-h/Experiments/NeMo/nemo/core/classes/modelPT.py", line 490, in restore_from
instance = cls._save_restore_connector.restore_from(
File "/mrnas04/internal/wenchin-h/Experiments/NeMo/nemo/core/connectors/save_restore_connector.py", line 285, in restore_from
self.load_instance_with_state_dict(instance, state_dict, strict)
File "/mrnas04/internal/wenchin-h/Experiments/NeMo/nemo/core/connectors/save_restore_connector.py", line 232, in load_instance_with_state_dict
instance.load_state_dict(state_dict, strict=strict)
File "/mrnas04/internal/wenchin-h/Experiments/NeMo/nemo/collections/tts/models/magpietts.py", line 1115, in load_state_dict
child.load_state_dict(new_state_dict)
File "/mrnas04/internal/wenchin-h/Experiments/NeMo/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2635, in load_state_dict
raise RuntimeError(
RuntimeError: Error(s) in loading state_dict for Embedding:
size mismatch for weight: copying a param with shape torch.Size([2362, 768]) from checkpoint, the shape in current model is torch.Size([2317, 768]).
Expected behavior
Successfully loading the model
Environment overview (please complete the following information)
- Environment location: lab server
- Method of NeMo install:
git clone https://github.com/NVIDIA-NeMo/NeMo.git
cd NeMo
uv venv --python 3.10
source .venv/bin/activate
uv pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu126
uv pip install -e ".[tts]"
Environment details
- OS version: Ubuntu 24.04.3 LTS
- PyTorch version: 2.10+cu12.6
- Python version: 3.10
Additional context
One NVIDIA GeForce RTX 3090
Describe the bug
As title, or see below
Steps/Code to reproduce bug
in a python interpreter (via
uv run python):Expected behavior
Successfully loading the model
Environment overview (please complete the following information)
Environment details
Additional context
One NVIDIA GeForce RTX 3090