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

RecursionError: maximum recursion depth exceeded while calling a Python object

Open Envyana opened this issue 1 year ago • 3 comments

An error occurred during the loading process of the .safetensors model. I have not been able to identify the root cause of the problem

Error occurred when executing [Comfy3D] Load SF3D Model:

maximum recursion depth exceeded while calling a Python object

File "D:\comfyui_sinergi\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\comfyui_sinergi\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_sinergi\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\comfyui_sinergi\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1969, in load_SF3D sf3d_model = SF3D.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^ File "D:\comfyui_sinergi\ComfyUI\custom_nodes\ComfyUI-3D-Pack\Gen_3D_Modules\StableFast3D\sf3d\system.py", line 79, in from_pretrained load_model(model, weight_path) File "D:\comfyui_sinergi\python_embeded\Lib\site-packages\safetensors\torch.py", line 198, in load_model model_state_dict = model.state_dict() ^^^^^^^^^^^^^^^^^^ File "D:\comfyui_sinergi\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1916, in state_dict module.state_dict(destination=destination, prefix=prefix + name + '.', keep_vars=keep_vars) File "D:\comfyui_sinergi\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1916, in state_dict module.state_dict(destination=destination, prefix=prefix + name + '.', keep_vars=keep_vars) File "D:\comfyui_sinergi\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1916, in state_dict module.state_dict(destination=destination, prefix=prefix + name + '.', keep_vars=keep_vars) [Previous line repeated 980 more times] File "D:\comfyui_sinergi\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1913, in state_dict self._save_to_state_dict(destination, prefix, keep_vars) File "D:\comfyui_sinergi\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1821, in _save_to_state_dict for name, param in self._parameters.items(): ^^^^^^^^^^^^^^^^^^^^^^^^

Envyana avatar Aug 14 '24 13:08 Envyana

I just ran into the same issue with the exact same stacktrace. I was playing around with other nodes and it broke. I'm running a docker image so i recreated the container and it works again, so it seems some package breaks this, everything else is the same.

It's not related to a ComfyUI update, I just installed the latest version and it still works.

I did a pip list before and after so somewhere in the diff is going to be the culprit

drake7707 avatar Oct 14 '24 06:10 drake7707

Rather than going through package by package it made more sense to go by failed imported custom nodes;

https://github.com/SpenserCai/ComfyUI-FunAudioLLM/blob/main/requirements.txt

breaks it

drake7707 avatar Oct 14 '24 07:10 drake7707

Ok I found the culprit, it's modelscope https://github.com/modelscope/modelscope

drake7707 avatar Oct 14 '24 07:10 drake7707