Kosinkadink / ComfyUI-Advanced-ControlNet

ControlNet scheduling and masking nodes with sliding context support
GNU General Public License v3.0
619 stars 61 forks source link

module 'comfy.ops' has no attribute 'disable_weight_init' #45

Closed gordingus closed 7 months ago

gordingus commented 11 months ago

Node won't import properly because of this:

Traceback (most recent call last):
  File "D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\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 "D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\__init__.py", line 1, in <module>
    from .control.nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\control\nodes.py", line 6, in <module>
    from .control import load_controlnet, convert_to_advanced, is_advanced_controlnet
  File "D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\control\control.py", line 12, in <module>
    from .control_sparsectrl import SparseControlNet, SparseCtrlMotionWrapper, SparseMethod, SparseSettings, SparseSpreadMethod, PreprocSparseRGBWrapper
  File "D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\control\control_sparsectrl.py", line 30, in <module>
    from .utils import TimestepKeyframeGroup, disable_weight_init_clean_groupnorm, prepare_mask_batch
  File "D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet\control\utils.py", line 228, in <module>
    class disable_weight_init_clean_groupnorm(comfy.ops.disable_weight_init):
AttributeError: module 'comfy.ops' has no attribute 'disable_weight_init'

Cannot import D:\Program Files\Visions of Chaos\Machine Learning Files\Text To Image\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Advanced-ControlNet module for custom nodes: module 'comfy.ops' has no attribute 'disable_weight_init'
Kosinkadink commented 11 months ago

You need to update your ComfyUI - a couple weeks ago, ComfyUI reorganized the comfy.ops file.