Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
6.3k stars 301 forks source link

fbgemm.dll - The specified module could not be found #965

Open Hii-ops opened 1 month ago

Hii-ops commented 1 month ago

I have problem with launch local managed server on AI plugin.

INFO OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\opako\AppData\Roaming\krita\pykrita\ComfyUI\python\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies. ERROR

Is there any solution?

Thanx

hermessalomon commented 1 month ago

I have the same issue

hermessalomon commented 1 month ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

Hii-ops commented 1 month ago

Thanks bro manually adding dll fixed it. Its working now

ChelOis commented 1 month ago

Thank a lot. I solved the same problem here with your tip.

bitjager commented 1 month ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

thanx this works for me, windows 11 just drop .dll on /windows/system32 folder

meikodunois commented 1 month ago

Same issue, and I can't download that DLL, for some reason i can't access to DLLMe in my country, and i don't find it anywhere else

Hii-ops commented 1 month ago

Same issue, and I can't download that DLL, for some reason i can't access to DLLMe in my country, and i don't find it anywhere else

Try with VPN joining with other country

ChelOis commented 1 month ago

SetupVPN extension for your browser.

Acly commented 1 month ago

For the latest release v1.21.0 I pinned the pytorch version to 2.3.1 That means people who (re-)install with that version shouldn't run into this problem.

Maybe it will be fixed on pytorch side in the future by including the DLL, but I'm not sure and it'll probably take some time: https://github.com/pytorch/pytorch/issues/131662

Evionail commented 1 month ago

Same issue, and I can't download that DLL, for some reason i can't access to DLLMe in my country, and i don't find it anywhere else

If Drive works on your country then here have the file I uploaded to Drive https://drive.google.com/file/d/1R_ZQjL0r1eBzDZIuFUykDqy5P2L4-92W/view

flaviohr commented 1 month ago

I was solved that error by installing "Build Tools for Visual Studio 2022" but you can try too "Build Tools for Visual Studio 2019"

zenkovski commented 1 month ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

thanks g its working now

pistqak commented 1 month ago

I have problem with launch local managed server on AI plugin.

INFO OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\opako\AppData\Roaming\krita\pykrita\ComfyUI\python\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies. ERROR

Is there any solution?

Thanx

Mine still not working image image

hermessalomon commented 1 month ago

@pistqak download the dependencies tool to find wich one is missing to you, if you already have the libomp140 it should be a different dependencie and it will give you wich one is missing

here is the link for the tool

https://github.com/lucasg/Dependencies

pistqak commented 1 month ago

@pistqak download the dependencies tool to find wich one is missing to you, if you already have the libomp140 it should be a different dependencie and it will give you wich one is missing

here is the link for the tool

https://github.com/lucasg/Dependencies

thx

james2342342514 commented 1 month ago

THIS WORKED FOR ME:

If you encounter an error related to missing DLL files (specifically fbgemm.dll) on Windows 11, follow these steps to resolve the issue:

  1. Download and run the Visual Studio Installer.
  2. Select "Modify" if you have Visual Studio installed, or proceed with a new installation.
  3. Go to the "Individual components" tab.
  4. Search for "C++ 2022" in the search box.
  5. Check the box next to "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)".
  6. Click "Modify" or "Install" to proceed with the installation.
  7. Restart your computer after the installation is complete.
  8. This installs the necessary C++ build tools and runtime libraries that PyTorch depends on.
ChelOis commented 1 month ago

THIS WORKED FOR ME:

If you encounter an error related to missing DLL files (specifically fbgemm.dll) on Windows 11, follow these steps to resolve the issue:

1. Download and run the Visual Studio Installer.

2. Select "Modify" if you have Visual Studio installed, or proceed with a new installation.

3. Go to the "Individual components" tab.

4. Search for "C++ 2022" in the search box.

5. Check the box next to "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)".

6. Click "Modify" or "Install" to proceed with the installation.

7. Restart your computer after the installation is complete.

8. This installs the necessary C++ build tools and runtime libraries that PyTorch depends on.

First, I solved the problem with the tip provided by hermessalomon, I mean, copying libomp140.x86_64.dll (signed by Autodesk) to Windows\System32 folder. I can confirm adding "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)" to my installation of Visual Studio also injects that dll (signed by Microsoft). Thank to both of you.

npbenjohnson commented 1 month ago

THIS WORKED FOR ME:

If you encounter an error related to missing DLL files (specifically fbgemm.dll) on Windows 11, follow these steps to resolve the issue:

  1. Download and run the Visual Studio Installer.
  2. Select "Modify" if you have Visual Studio installed, or proceed with a new installation.
  3. Go to the "Individual components" tab.
  4. Search for "C++ 2022" in the search box.
  5. Check the box next to "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)".
  6. Click "Modify" or "Install" to proceed with the installation.
  7. Restart your computer after the installation is complete.
  8. This installs the necessary C++ build tools and runtime libraries that PyTorch depends on.

Thanks for the fix! Short version:

winget install --id Microsoft.VisualStudio.2022.BuildTools --override "--passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
AgMagGag commented 1 month ago

THIS WORKED FOR ME:

If you encounter an error related to missing DLL files (specifically fbgemm.dll) on Windows 11, follow these steps to resolve the issue:

  1. Download and run the Visual Studio Installer.
  2. Select "Modify" if you have Visual Studio installed, or proceed with a new installation.
  3. Go to the "Individual components" tab.
  4. Search for "C++ 2022" in the search box.
  5. Check the box next to "MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)".
  6. Click "Modify" or "Install" to proceed with the installation.
  7. Restart your computer after the installation is complete.
  8. This installs the necessary C++ build tools and runtime libraries that PyTorch depends on.

Thanks for the fix! Short version:

winget install --id Microsoft.VisualStudio.2022.BuildTools --override "--passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"

Thank you so freaking much for not making me use some random dll because i'm pretty sure that's how ya hack ya self. Xo

ChelOis commented 1 month ago

Thank you so freaking much for not making me use some random dll because i'm pretty sure that's how ya hack ya self. Xo

The DLL suggested by hermessalomon is digitally signed by Autodesk, so, no risk.

AadhithSridharan commented 3 weeks ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder. https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

Tqsm @hermessalomon this works

berwinsingh commented 1 week ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

This was a life saver. I was looking for a solution for such a long time, but this worked like a charm

AARADHYAPATEL commented 1 week ago

Hey there, I have the fbgemm.dll but it seems corrupted, should I delete it and then reinstall it

AARADHYAPATEL commented 1 week ago

As it is still giving the issue that fbgemm.dll or one of its dependencies are corrupted

ChelOis commented 1 week ago

Did you try the solutions given by zenkovski and by james2342342514 ?

Timmate commented 1 week ago

For the latest release v1.21.0 I pinned the pytorch version to 2.3.1 That means people who (re-)install with that version shouldn't run into this problem.

Maybe it will be fixed on pytorch side in the future by including the DLL, but I'm not sure and it'll probably take some time: pytorch/pytorch#131662

This one solved it for me (had PyTorch 2.4.0, Windows 10), didn't even need to fiddle with the C++ stuff. Much appreciated!

AARADHYAPATEL commented 1 week ago

I do not have space in my computer for zenkovski's option and I already have fbgemm.dll, so neither option works

ahmadatarvo commented 1 week ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

Solved my issue my adding .dll file in windows/system32 Thanks a lot

Kaizer1er commented 1 week ago

J'ai trouvé la solution, vous avez 2 options, la plus simple est d'installer cette dll et de l'ajouter à votre dossier /windows/system32.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

si cela ne corrige pas l'erreur, vous devrez télécharger l'outil de dépendances pour trouver quel .dll est perdu et le télécharger simplement et il devrait être corrigé.

Merci mec pour le tifs

Aron-Arboleda commented 1 week ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

THANKS SO MUCHH!

NgoDuc2505 commented 5 days ago

/windows/system32

Thanks a lot. It works...

MusabAlam commented 5 days ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

It Worked, thank you. Been solving this issue from a very long time

Zavieer commented 4 days ago

I found the solution, you have 2 options, the most simple is to install this dll and adding it to your /windows/system32 folder.

https://www.dllme.com/dll/files/libomp140_x86_64/00637fe34a6043031c9ae4c6cf0a891d/download

if it doesnt fix the error you will have to download the dependencies tool to find wich .dll is lost and just download it and it should be fixed.

Thank you very much, it solved my problem.

pollo-coder commented 2 days ago

A thing is not clear to me. Is (or at least was) this a bug in pytorch, which will be fixed (or maybe already fixed in 2.4.1)?

Acly commented 2 days ago

Yes it was a bug in pytorch. They fixed it fairly quickly, so I expect it's no longer a problem in 2.4.1