Akegarasu / Akegarasu/lora-scripts

flux lora 训练报错NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.

未关闭
#607 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
6.1k
派生
699
PR 合并指标
30 天内没有已合并 PR

描述

Traceback (most recent call last):
File "G:\lora-scripts\scripts\dev\flux_train_network.py", line 519, in
trainer.train(args)
File "G:\lora-scripts\scripts\dev\train_network.py", line 402, in train
self.cache_text_encoder_outputs_if_needed(args, accelerator, unet, vae, text_encoders, train_dataset_group, weight_dtype)
File "G:\lora-scripts\scripts\dev\flux_train_network.py", line 209, in cache_text_encoder_outputs_if_needed
unet.to("cpu")
File "G:\lora-scripts\venv\lib\site-packages\torch\nn\modules\module.py", line 1174, in to
return self._apply(convert)
File "G:\lora-scripts\venv\lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
module._apply(fn)
File "G:\lora-scripts\venv\lib\site-packages\torch\nn\modules\module.py", line 805, in _apply
param_applied = fn(param)
File "G:\lora-scripts\venv\lib\site-packages\torch\nn\modules\module.py", line 1167, in convert
raise NotImplementedError(
NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.
18:18:01-885824 ERROR Training failed / 训练失败

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。