You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flux-lora]训练失败: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.
#485
Closed
AhBumm opened this issue
Aug 24, 2024
· 2 comments
2024-08-25 03:19:15 INFO move vae and unet to cpu to save memory flux_train_network.py:156
Traceback (most recent call last):
File "/home/lmx/lora-webui/./sd-scripts/flux_train_network.py", line 411, in
trainer.train(args)
File "/home/lmx/lora-webui/sd-scripts/train_network.py", line 390, in train
self.cache_text_encoder_outputs_if_needed(args, accelerator, unet, vae, text_encoders, train_dataset_group, weight_dtype)
File "/home/lmx/lora-webui/./sd-scripts/flux_train_network.py", line 160, in cache_text_encoder_outputs_if_needed
unet.to("cpu")
File "/home/lmx/lora-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1174, in to
return self._apply(convert)
File "/home/lmx/lora-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
File "/home/lmx/lora-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 805, in _apply
param_applied = fn(param)
File "/home/lmx/lora-webui/venv/lib/python3.10/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.
03:19:16-424748 ERROR Training failed / 训练失败
节省显存相关设置截图
The text was updated successfully, but these errors were encountered:
2024-08-25 03:19:15 INFO move vae and unet to cpu to save memory flux_train_network.py:156
Traceback (most recent call last):
File "/home/lmx/lora-webui/./sd-scripts/flux_train_network.py", line 411, in
trainer.train(args)
File "/home/lmx/lora-webui/sd-scripts/train_network.py", line 390, in train
self.cache_text_encoder_outputs_if_needed(args, accelerator, unet, vae, text_encoders, train_dataset_group, weight_dtype)
File "/home/lmx/lora-webui/./sd-scripts/flux_train_network.py", line 160, in cache_text_encoder_outputs_if_needed
unet.to("cpu")
File "/home/lmx/lora-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1174, in to
return self._apply(convert)
File "/home/lmx/lora-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 780, in _apply
module._apply(fn)
File "/home/lmx/lora-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 805, in _apply
param_applied = fn(param)
File "/home/lmx/lora-webui/venv/lib/python3.10/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.
03:19:16-424748 ERROR Training failed / 训练失败
节省显存相关设置截图
The text was updated successfully, but these errors were encountered: