StartHua / ComfyUI_Seg_VITON

comfyui-模特换装(Model dress up)
173 stars 31 forks source link

No module named 'diffusers.models.autoencoder_kl' #21

Open Tobe2d opened 3 months ago

Tobe2d commented 3 months ago

When I run the workflow it give an error on stabel_vition node as the screenshot: image

error:

Error occurred when executing stabel_vition:

No module named 'diffusers.models.autoencoder_kl'

File "D:\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\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 "D:\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\stabel_vition.py", line 128, in sample
self.model = create_model(config_path=None, config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\model.py", line 8, in create_model
model = instantiate_from_config(config.model).cpu()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\util.py", line 119, in instantiate_from_config
return get_obj_from_str(config["target"])(**config.get("params", dict()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\util.py", line 127, in get_obj_from_str
return getattr(importlib.import_module(module, package=None), cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\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 "D:\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\cldm\cldm.py", line 14, in
from ldm.models.diffusion.ddpm import LatentDiffusion
File "D:\ComfyUI\custom_nodes\ComfyUI_Seg_VITON\ldm\models\diffusion\ddpm.py", line 26, in
from diffusers.models.autoencoder_kl import AutoencoderKLOutput

I updated diffusers to the latest and still same error.

Any idea how to solve it?

winjvlee commented 3 months ago

https://github.com/StartHua/ComfyUI_Seg_VITON/issues/15

signerzwb commented 1 week ago

hi, try this: Open custom_nodes\ComfyUI_Seg_VITON\ldm\models\diffusion\ddpm.py Code: """ from diffusers.models.autoencoder_kl import AutoencoderKLOutput from diffusers.models.vae import DecoderOutput """ to """ from diffusers.models.autoencoders.autoencoder_kl import AutoencoderKLOutput from diffusers.models.autoencoders.vae import DecoderOutput