flowtyone / ComfyUI-Flowty-CRM

This is a custom node that lets you use Convolutional Reconstruction Models right from ComfyUI.
Other
128 stars 7 forks source link

How can I start the build nvdiffrast , I have already completed all the steps from the instructions #15

Open ShockWave2048 opened 3 months ago

ShockWave2048 commented 3 months ago

Can't run on Windows11+cuda (3090). Maybe somewhere there are step-by-step instructions (https://nvlabs.github.io/nvdiffrast/#windows) for assembly and testing this plug?

CUDA path exists and set in env.

Thanks on answers! Error occurred when executing CRMModelerCuda:

DLL load failed while importing nvdiffrast_plugin: Module not found.

File "F:\Store\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "F:\Store\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "F:\Store\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "F:\Store\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\__init__.py", line 327, in make_model
mesh = generate3d_cuda(crm_model, rgb, ccm, device)
File "F:\Store\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Flowty-CRM\crmlib\inference.py", line 97, in generate3d_cuda
glctx = dr.RasterizeCudaContext()
File "C:\Users\krami\AppData\Local\Programs\Python\Python310\lib\site-packages\nvdiffrast\torch\ops.py", line 177, in __init__
self.cpp_wrapper = _get_plugin().RasterizeCRStateWrapper(cuda_device_idx)
File "C:\Users\krami\AppData\Local\Programs\Python\Python310\lib\site-packages\nvdiffrast\torch\ops.py", line 118, in _get_plugin
torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
File "C:\Users\krami\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils\cpp_extension.py", line 1306, in load
return _jit_compile(
File "C:\Users\krami\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils\cpp_extension.py", line 1736, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "C:\Users\krami\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils\cpp_extension.py", line 2132, in _import_module_from_library
module = importlib.util.module_from_spec(spec)
File "", line 571, in module_from_spec
File "", line 1176, in create_module
File "", line 241, in _call_with_frames_removed
flowtyone commented 3 months ago

Please check out https://github.com/flowtyone/ComfyUI-Flowty-CRM/issues/4

Pedroman1 commented 3 months ago

module from hell so difficult cannot get this nvdiffrast to work seriously its a tough sob

ShockWave2048 commented 3 months ago

I'm ready to assemble the module step by step, specify it in the paths, and configure it. But I don’t see instructions anywhere on how it is compiled and installed in a Python extension! Even in the official documentation. The compilation is indicated there in passing, that's all.

EIegance commented 1 month ago

For anyone coming across this looking for a fix; the only thing that solved it for me after many hours was:

I basically reinstalled everything and then made sure ComfyUI was running PyTorch 2.4.0+cu121. I doubt you'll have to do that as long as you fully switch your PyTorch version. But in case you still can't get it working id recommend starting fresh, and its easy if you still have your _ComfyUI_windowsportable to import everything from.