mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-14 11:27:00 +08:00
nit
This commit is contained in:
parent
10e08b0554
commit
73b26e5375
@ -5,6 +5,10 @@ import ctypes
|
||||
import logging
|
||||
|
||||
|
||||
def fix_pytorch_libomp():
|
||||
"""
|
||||
Fix PyTorch libomp DLL issue on Windows by copying the correct DLL file if needed.
|
||||
"""
|
||||
torch_spec = importlib.util.find_spec("torch")
|
||||
for folder in torch_spec.submodule_search_locations:
|
||||
lib_folder = os.path.join(folder, "lib")
|
||||
@ -13,7 +17,7 @@ for folder in torch_spec.submodule_search_locations:
|
||||
if os.path.exists(dest):
|
||||
break
|
||||
|
||||
with open(test_file, 'rb') as f:
|
||||
with open(test_file, "rb") as f:
|
||||
contents = f.read()
|
||||
if b"libomp140.x86_64.dll" not in contents:
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user