Skip to content

comfyui brushnet import failed #201

Description

@AlexSL222222

Traceback (most recent call last):
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\utils\import_utils.py", line 953, in get_module
return importlib.import_module("." + module_name, self.name)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "importlib_init
.py", line 88, in import_module
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 1026, in exec_module
File "", line 488, in _call_with_frames_removed
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\loaders\peft.py", line 39, in
from .lora_base import fetch_state_dict, func_optionally_disable_offloading
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\loaders\lora_base.py", line 56, in
from peft.tuners.tuners_utils import BaseTunerLayer
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft_init
.py", line 17, in
from .auto import (
...<8 lines>...
)
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\auto.py", line 31, in
from .config import PeftConfig
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\config.py", line 24, in
from .utils import CONFIG_NAME, PeftType, TaskType
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\utils_init
.py", line 16, in
from .loftq_utils import replace_lora_weights_loftq
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\peft\utils\loftq_utils.py", line 25, in
from accelerate.utils.memory import clear_device_cache
ImportError: cannot import name 'clear_device_cache' from 'accelerate.utils.memory' (G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\accelerate\utils\memory.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "G:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2133, in load_custom_node
module_spec.loader.exec_module(module)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
File "", line 1026, in exec_module
File "", line 488, in call_with_frames_removed
File "G:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BrushNet_init
.py", line 1, in
from .brushnet_nodes import BrushNetLoader, BrushNet, BlendInpaint, PowerPaintCLIPLoader, PowerPaint, CutForInpaint
File "G:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BrushNet\brushnet_nodes.py", line 14, in
from .brushnet.brushnet import BrushNetModel
File "G:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BrushNet\brushnet\brushnet.py", line 20, in
from .unet_2d_blocks import (
...<8 lines>...
)
File "G:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BrushNet\brushnet\unet_2d_blocks.py", line 36, in
from diffusers.models.transformers.dual_transformer_2d import DualTransformer2DModel
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\models\transformers_init_.py", line 5, in
from .auraflow_transformer_2d import AuraFlowTransformer2DModel
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\models\transformers\auraflow_transformer_2d.py", line 23, in
from ...loaders import FromOriginalModelMixin, PeftAdapterMixin
File "", line 1412, in _handle_fromlist
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\utils\import_utils.py", line 943, in getattr
module = self._get_module(self._class_to_module[name])
File "G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\utils\import_utils.py", line 955, in _get_module
raise RuntimeError(
...<2 lines>...
) from e
RuntimeError: Failed to import diffusers.loaders.peft because of the following error (look up to see its traceback):
cannot import name 'clear_device_cache' from 'accelerate.utils.memory' (G:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\accelerate\utils\memory.py)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions