comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
58.99k stars 6.26k forks source link

No module named 'pytorch_lightning.utilities.distributed' #2959

Open kakachiex2 opened 9 months ago

kakachiex2 commented 9 months ago

I get this error when running my Viton workflow but its relate to pytorch lightning, what is the recommended version of pytorch-lightning to install in comfyui.

Error occurred when executing stabel_vition:

No module named 'pytorch_lightning.utilities.distributed'

File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\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 "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\stabel_vition.py", line 128, in sample self.model = create_model(config_path=None, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\model.py", line 8, in create_model model = instantiate_from_config(config.model).cpu() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\ldm\util.py", line 119, in instantiate_from_config return get_obj_from_str(config["target"])(config.get("params", dict())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\ldm\util.py", line 127, in get_obj_from_str return getattr(importlib.import_module(module, package=None), cls) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\cldm.py", line 14, in from ldm.models.diffusion.ddpm import LatentDiffusion File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\ldm\models\diffusion\ddpm.py", line 20, in from pytorch_lightning.utilities.distributed import rank_zero_only

kakachiex2 commented 9 months ago

Its happen with this extension : https://github.com/StartHua/ComfyUI_Seg_VITON

robinjhuang commented 9 months ago

What version of pytorch-lightning do you have installed? Is it the same as the one listed in ComfyUI_Seg_VITON?