-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
|
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。 |
I changed in workflow.json \ to / |
You have to replace from diffusers.models.unet_2d_blocks to from diffusers.models.unets.unet_2d_blocks (everywhere) its in like a 20 places. |
|
在大家的指导下,特别是 Neytiri7的提醒,解决了问题。思路和方法如下:一、from diffusers.models.unet_2d_blocks import CrossAttnDownBlock2D, CrossAttnUpBlock2D, DownBlock2D, UpBlock2D,找不到python库的模块,我就到python\Lib\site-packages\diffusers\models确实没有unet_2d_blocks块,最后在python\Lib\site-packages\diffusers\models\unets里面找到这一块;二、分析说明是这个模块发生了变化,只需要修改from就可以;三、在LCM中很多个文件中都有from diffusers.models.unet_2d_blocks,要逐一找到修改;四、修改内容很简单:将from diffusers.models.unet_2d_blocks修改成from diffusers.models.unets.unet_2d_blocks,问题完美解决。 |
I hope it will be fixed formally. |
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'
The text was updated successfully, but these errors were encountered: