Stability-AI / stable-fast-3d

SF3D: Stable Fast 3D Mesh Reconstruction with UV-unwrapping and Illumination Disentanglement
https://stable-fast-3d.github.io
Other
1.2k stars 131 forks source link

work with comfyui but Exception during processing:DLL load failed #23

Closed Jasonzhao66 closed 2 months ago

Jasonzhao66 commented 3 months ago

When I use the ComfyUI-3D-Pack node in comfyui, it cannot be called normally, 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

vork commented 3 months ago

We have recently updated our code base and removed the slang-based texture baker. This should fix your issue. We've also added Comfy nodes to the repo.