MrForExample / ComfyUI-3D-Pack

An extensive node suite that enables ComfyUI to process 3D inputs (Mesh & UV Texture, etc) using cutting edge algorithms (3DGS, NeRF, etc.)
MIT License
2.21k stars 221 forks source link

CRM workflow out of memory #122

Open 812886293 opened 6 months ago

812886293 commented 6 months ago

{9F8A9A6F-8568-4ff7-B19E-1AD2F58645D1}

When the workflow runs to this node, there will be out of memory

torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 11.18 GiB Requested : 9.00 MiB Device limit : 11.99 GiB Free (according to CUDA): 0 bytes PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

Has anyone been in the same situation?my gpu is RTX 4070 Ti

kakachiex2 commented 6 months ago

Same problem here but my card is old RTX260 6Gb VideoRam

kakachiex2 commented 6 months ago

I get this erros wen it get to this point :: Screenshot 2024-03-24 121444

Error occurred when executing [Comfy3D] Convolutional Reconstruction Model:

Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 9.31 GiB Requested : 1.01 GiB Device limit : 6.00 GiB Free (according to CUDA): 0 bytes PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\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 "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1934, in run_CRM mesh = CRMSampler.generate3d(crm_model, np_imgs, np_xyzs, device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\algorithms\convolutional_reconstruction_model.py", line 166, in generate3d verts, faces = crm_model.decode(data_config, triplane_feature2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\crm\model.py", line 76, in decode out = self.sdfMlp(dec_verts) ^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\crm\model\archs\mlp_head.py", line 17, in forward x = F.relu(self.fc1(input)) ^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\nn\functional.py", line 1473, in relu result = torch.relu(input) ^^^^^^^^^^^^^^^^^