Failed to import pytorch fbgemm.dll or one of its dependencies is missing

I had the same issue with fbgemm.dll when trying to run a ComfyUI session after following comflowy CLI procedure for installation, when invoking python main.py

Thank you for mentioning the idea of checking for fbgemm.dll with dedicated tool, this unlocked my situation but dependency walker dates back 2006, since then dll have changed and a more modern tool is required, found lucasg dependencies. This latest tool shows only one missing dependency to fbgemm.dll in my windows setup and that was libomp140.x86_64.dll

Since it is distributed with visual studio (not visual studio code) I installed visual studio community edition and libomp140.x86_64.dll was now put in both the visual studio program files and in C:\Windows\System32\ ie. in the Path. Now the ComfyUI main.py script runs fine on my system. Hope this helps.

7 Likes