欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 科技 > IT业 > Mac M1 Comfyui 使用MMAudio遇到的问题解决?

Mac M1 Comfyui 使用MMAudio遇到的问题解决?

2025/2/8 4:42:24 来源:https://blog.csdn.net/qq_42393720/article/details/145429241  浏览:    关键词:Mac M1 Comfyui 使用MMAudio遇到的问题解决?

问题1: AssertionError: Torch not compiled with CUDA enabled?

解决办法:修改代码以 CPU 运行

第一步:找到 /ComfyUI/custom_nodes/ComfyUI-MMAudio/mmaudio/ext/autoencoder/vae.py文件中的下面这两行代码
self.data_mean = nn.Buffer(torch.tensor(DATA_MEAN_128D, dtype=torch.float32).cuda())
self.data_std = nn.Buffer(torch.tensor(DATA_STD_128D, dtype=torch.float32).cuda())

第二步:将其修改为:

self.data_mean = nn.Buffer(torch.tensor(DATA_MEAN_128D, dtype=torch.float32).cpu())
self.data_std = nn.Buffer(torch.tensor(DATA_STD_128D, dtype=torch.float32).cpu())

问题2: NotImplementedError: The operator ‘aten::_upsample_bicubic2d_aa.out’ is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS?

解决办法:临时解决办法:启用 MPS 回退机制

在main.py中 import os 后面添加如下代码:

import os
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"

问题3: ComfyUI/custom_nodes/ComfyUI-MMAudio/mmaudio/model/utils/features_utils.py", line 112, in encode_video_with_sync x = torch.stack(segments, dim=1) # (B, S, T, C, H, W) RuntimeError: stack expects a non-empty TensorList?

解决办法:上传的视频时长太短,重新选择时长稍微长些的视频。

问题4: NotImplementedError: Output channels > 65536 not supported at the MPS device?

解决办法:更新 PyTorch 版本

pip install --upgrade torch torchvision torchaudio

问题5: ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite/videohelpersuite/server.py", line 86, in view_video if int(query.get(‘force_rate’,0)) != 0:^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ‘7.87890625’?

解决办法:在VideoHelperSuite节点的format格式animatediff 修改为Hunyuan

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com