taabata / LCM_Inpaint_Outpaint_Comfy

ComfyUI custom nodes for inpainting/outpainting using the new latent consistency model (LCM)
243 stars 17 forks source link

Cannot import F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy module for custom nodes: No module named 'diffusers.models.unet_2d_blocks' #37

Open Andy2024mm opened 3 weeks ago

Andy2024mm commented 3 weeks ago

Traceback (most recent call last): File "F:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1993, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy__init__.py", line 1, in from .LCM_Nodes import NODE_CLASS_MAPPINGS File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy\LCM_Nodes.py", line 9, in from .LCM.LCM_reference_pipeline import LatentConsistencyModelPipeline_reference File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy\LCM\LCM_reference_pipeline.py", line 33, in from diffusers.models.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D ModuleNotFoundError: No module named 'diffusers.models.unet_2d_blocks'

Neytiri7 commented 4 days ago
Traceback (most recent call last):
  File "W:\SynologyDrive\ComfyUI-webui\ComfyUI\nodes.py", line 2001, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "W:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy\__init__.py", line 1, in <module>
    from .LCM_Nodes import NODE_CLASS_MAPPINGS
  File "W:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy\LCM_Nodes.py", line 9, in <module>
    from .LCM.LCM_reference_pipeline import LatentConsistencyModelPipeline_reference
  File "W:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy\LCM\LCM_reference_pipeline.py", line 33, in <module>
    from diffusers.models.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D
ModuleNotFoundError: No module named 'diffusers.models.unet_2d_blocks'

Cannot import W:\SynologyDrive\ComfyUI-webui\ComfyUI\custom_nodes\LCM_Inpaint-Outpaint_Comfy module for custom nodes: No module named 'diffusers.models.unet_2d_blocks'
glg5 commented 2 days ago

Diffusers 包已将unet_2d_blocks.py 移至“diffusers/models/unets/”路径,而不是以前的“diffusers/models/”路径。 LCM_Inpaint_Outpaint_Comfy/LCM的py文件(包括LCM_lora_inpaint.py,LCM_refinpaint_pipeline.py,LCM_reference_pipeline.py,LCM_lora_inpaint_ipadapter.py,pipeline_cn_reference_img2img.py,pipeline_inpaint_cn_reference.py,stable_diffusion_reference_img2img.py,stable_diffusion_reference_img2img_controlnet.py)应从 更改from diffusers.models.unet_2d_blocks import UNetMidBlock2D, get_down_block, get_up_block为from diffusers.models.unets.unet_2d_blocks import UNetMidBlock2D, get_down_block, get_up_block。