TTS模型,加载模型报错,说是pytorch版本导致 #709

Open
opened 2025-04-25 00:59:56 +08:00 by jiangjiazhizhi · 1 comment

with torch.no_grad():
output = model(**inputs).waveform
执行报错ModuleNotFoundError: No module named 'torch.distributed.fsdp'
torch.distributed.fsdp 说是 PyTorch 1.11+ 版本引入的 ​完全分片数据并行,老师为什么执行pytorch==1.10.0版本可以成功

with torch.no_grad(): output = model(**inputs).waveform 执行报错ModuleNotFoundError: No module named 'torch.distributed.fsdp' torch.distributed.fsdp 说是 PyTorch 1.11+ 版本引入的 ​完全分片数据并行,老师为什么执行pytorch==1.10.0版本可以成功

模型代码可能有条件分支,例如:
if torch.__version__ >= "1.11":
from torch.distributed.fsdp import FullyShardedDataParallel
else:
# 回退到其他并行策略(如 DDP)
from torch.nn.parallel import DistributedDataParallel
建议直接升级到 PyTorch 1.11.0 或更高版本

模型代码可能有条件分支,例如: `if torch.__version__ >= "1.11":` ` from torch.distributed.fsdp import FullyShardedDataParallel` `else:` ` # 回退到其他并行策略(如 DDP)` ` from torch.nn.parallel import DistributedDataParallel` 建议直接升级到 PyTorch 1.11.0 或更高版本
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#709
No description provided.