Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

cannot import name 'CompVisVDenoiser' from 'comfy.samplers' #247

Open
momognu opened this issue Dec 2, 2023 · 4 comments
Open

cannot import name 'CompVisVDenoiser' from 'comfy.samplers' #247

momognu opened this issue Dec 2, 2023 · 4 comments

Comments

@momognu
Copy link

momognu commented Dec 2, 2023

ImportError: cannot import name 'CompVisVDenoiser' from 'comfy.samplers'

@suito-venus
Copy link

Traceback (most recent call last):
  File "C:\workspaces_c\comfyUI_20231115\ComfyUI\nodes.py", line 1800, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\workspaces_c\comfyUI_20231115\ComfyUI\custom_nodes\efficiency-nodes-comfyui\__init__.py", line 1, in <module>
    from .efficiency_nodes import NODE_CLASS_MAPPINGS
  File "C:\workspaces_c\comfyUI_20231115\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 46, in <module>
    from .py import smZ_cfg_denoiser
  File "C:\workspaces_c\comfyUI_20231115\ComfyUI\custom_nodes\efficiency-nodes-comfyui\py\smZ_cfg_denoiser.py", line 7, in <module>
    from comfy.samplers import KSampler, CompVisVDenoiser, KSamplerX0Inpaint
ImportError: cannot import name 'CompVisVDenoiser' from 'comfy.samplers' (C:\workspaces_c\comfyUI_20231115\ComfyUI\comfy\samplers.py)

Cannot import C:\workspaces_c\comfyUI_20231115\ComfyUI\custom_nodes\efficiency-nodes-comfyui module for custom nodes: cannot import name 'CompVisVDenoiser' from 'comfy.samplers' (C:\workspaces_c\comfyUI_20231115\ComfyUI\comfy\samplers.py)

@andreszs
Copy link

andreszs commented Dec 3, 2023

Same error here with latest comfyui version.
Incredibly, they persist in hiding the version number so I have no idea what version this would be.

@suito-venus
Copy link

CompVisVDenoiser is not used in efficiency-nodes-comfyui.
So work around below.

\efficiency-nodes-comfyui\py\smZ_cfg_denoiser.py line 7
from comfy.samplers import KSampler, CompVisVDenoiser, KSamplerX0Inpaint
to
from comfy.samplers import KSampler, KSamplerX0Inpaint

this worked for me.

@wangwenqiao666
Copy link

The following modifications can be made:

from comfy.samplers import KSampler, CompVisVDenoiser, KSamplerX0Inpaint

from comfy.k_diffusion.external import CompVisDenoiser

from comfy.samplers import KSampler, KSamplerX0Inpaint
from k_diffusion.external import CompVisDenoiser, CompVisVDenoiser

image

Then it will run without error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants