Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: cannot pin 'torch.cuda.FloatTensor' #20

Open
JeltzProstetnic opened this issue Jul 22, 2024 · 0 comments
Open

Error: cannot pin 'torch.cuda.FloatTensor' #20

JeltzProstetnic opened this issue Jul 22, 2024 · 0 comments

Comments

@JeltzProstetnic
Copy link

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.9.4
CUDA 12.1

Create LoRA for Textencoder : 264 modules.
0%| | 0/1000 [00:00<?, ?it/s]Traceback (most recent call last):
File "C:_AI\sd.webui.deforum\webui\extensions\sd-webui-traintrain\trainer\train.py", line 195, in train_main
result = train_lora(t)
File "C:_AI\sd.webui.deforum\webui\extensions\sd-webui-traintrain\trainer\train.py", line 248, in train_lora
for batch in t.dataloader:
File "C:_AI\sd.webui.deforum\webui\extensions\sd-webui-traintrain\trainer\dataset.py", line 52, in next
return next(self.iterators[idx])
File "C:_AI\sd.webui.deforum\system\python\lib\site-packages\torch\utils\data\dataloader.py", line 630, in next
data = self._next_data()
File "C:_AI\sd.webui.deforum\system\python\lib\site-packages\torch\utils\data\dataloader.py", line 676, in _next_data
data = _utils.pin_memory.pin_memory(data, self._pin_memory_device)
File "C:_AI\sd.webui.deforum\system\python\lib\site-packages\torch\utils\data_utils\pin_memory.py", line 63, in pin_memory
return type(data)({k: pin_memory(sample, device) for k, sample in data.items()}) # type: ignore[call-arg]
File "C:_AI\sd.webui.deforum\system\python\lib\site-packages\torch\utils\data_utils\pin_memory.py", line 63, in
return type(data)({k: pin_memory(sample, device) for k, sample in data.items()}) # type: ignore[call-arg]
File "C:_AI\sd.webui.deforum\system\python\lib\site-packages\torch\utils\data_utils\pin_memory.py", line 58, in pin_memory
return data.pin_memory(device)
RuntimeError: cannot pin 'torch.cuda.FloatTensor' only dense CPU tensors can be pinned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant