ai-toolkit icon indicating copy to clipboard operation
ai-toolkit copied to clipboard

Solution to, Error loading "D:\AI\ai-toolkit\venv\Lib\site-packages\torch\lib\fbgemm.dll"

Open Hikska opened this issue 1 year ago • 3 comments

Hi, I just wanted to share While following the instructions i got this error, when launching the training

{...]
  File "D:\AI\ai-toolkit\jobs\process\__init__.py", line 1, in <module>
    from .BaseExtractProcess import BaseExtractProcess
  File "D:\AI\ai-toolkit\jobs\process\BaseExtractProcess.py", line 4, in <module>
    from safetensors.torch import save_file
  File "D:\AI\ai-toolkit\venv\Lib\site-packages\safetensors\torch.py", line 6, in <module>
    import torch
  File "D:\AI\ai-toolkit\venv\Lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
Error loading "D:\AI\ai-toolkit\venv\Lib\site-packages\torch\lib\fbgemm.dll

this was solved by this solution: https://github.com/Acly/krita-ai-diffusion/issues/965

tldr, put the dll from the zip below into windows/system32 https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

it fixed the problem instantly !

Hikska avatar Aug 26 '24 20:08 Hikska

i meant maybe adding a note, in case people have this problem could help

Hikska avatar Aug 26 '24 20:08 Hikska

Anaconda is also worth a shot if people are installing from scratch on Windows; I haven't had any weird errors, and I'm also training LoRAs for Schnell.

EuphoricPenguin avatar Aug 27 '24 04:08 EuphoricPenguin

I had the same error. You need to go download Visual Studio 2022 Community Edition and just select the following option when installing: 352517926-81707c5d-d56e-49ce-8677-460a6c423d62

CambridgeComputing avatar Aug 28 '24 04:08 CambridgeComputing