ComfyUI-3D-Pack icon indicating copy to clipboard operation
ComfyUI-3D-Pack copied to clipboard

SF3D can't work with DLL load failed while importing _slangtorch_texture_baker_44136fa355b3678a

Open Jasonzhao66 opened this issue 1 year ago • 2 comments

When I use the ComfyUI-3D-Pack node in comfyui ,SF3D cannot work ,and the error message is as follows:

!!! Exception during processing!!! DLL load failed while importing _slangtorch_texture_baker_44136fa355b3678a: The specified module could not be found.
Traceback (most recent call last):
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1969, in load_SF3D
    sf3d_model = SF3D.from_pretrained(
                 ^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\StableFast3D\sf3d\system.py", line 78, in from_pretrained
    model = cls(cfg)
            ^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\StableFast3D\sf3d\models\utils.py", line 29, in __init__
    self.configure(*args, **kwargs)
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\StableFast3D\sf3d\system.py", line 128, in configure
    self.baker = TextureBaker()
                 ^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\StableFast3D\sf3d\texture_baker.py", line 13, in __init__
    self.baker = slangtorch.loadModule(
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\slangtorch\slangtorch.py", line 652, in loadModule
    rawModule = _loadModule(fileName, moduleName, buildDir, options, sourceDir=outputFolder, verbose=verbose, includePaths=includePaths, dryRun=False)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\slangtorch\slangtorch.py", line 571, in _loadModule
    slangLib, metadata = compileAndLoadModule(
                         ^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\slangtorch\slangtorch.py", line 460, in compileAndLoadModule
    slangLib = _compileAndLoadModule(metadata, sources, moduleName, buildDir, slangSourceDir, verbose)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\slangtorch\slangtorch.py", line 501, in _compileAndLoadModule
    return jit_compile(
           ^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\slangtorch\util\compile.py", line 93, in jit_compile
    return _import_module_from_library(name, build_directory, is_python_module)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\comfyui\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\cpp_extension.py", line 2146, in _import_module_from_library
    module = importlib.util.module_from_spec(spec)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 573, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1233, in create_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed

I've been stuck here for two days, please help

Jasonzhao66 avatar Aug 09 '24 14:08 Jasonzhao66

me too. ㅜㅜ;

DeuklyoungKo avatar Aug 14 '24 10:08 DeuklyoungKo

how to ?

gullyes avatar Aug 24 '24 09:08 gullyes

do you have Visual Studio Build Tools installed? Installation guide: https://github.com/bycloudai/InstallVSBuildToolsWindows

also you probably need Visual Studio Community 2019 with C++ MSVC v142

DenisKochetov avatar Aug 07 '25 04:08 DenisKochetov