ComfyUI-BiRefNet-ZHO icon indicating copy to clipboard operation
ComfyUI-BiRefNet-ZHO copied to clipboard

Unable to load, prompt: from utils import check_download_model ImportError: cannot import name 'check_download_model' from 'utils' (D:\ComfyUI\utils\__init__.py)

Open cjc999 opened this issue 1 year ago • 6 comments

Unable to load, prompt: from utils import check_download_model ImportError: cannot import name 'check_download_model' from 'utils' (D:\ComfyUI\utils_init_.py)

cjc999 avatar Sep 11 '24 04:09 cjc999

Same problem. Here is the log I got:

Traceback (most recent call last):
  File "D:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1993, 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 "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BiRefNet-ZHO\__init__.py", line 1, in <module>
    from . import birefnet
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BiRefNet-ZHO\birefnet.py", line 7, in <module>
    from models.baseline import BiRefNet
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BiRefNet\models\baseline.py", line 11, in <module>
    from models.backbones.build_backbone import build_backbone
  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BiRefNet\models\backbones\build_backbone.py", line 8, in <module>
    from utils import check_download_model
ImportError: cannot import name 'check_download_model' from 'utils' (D:\ComfyUI_windows_portable\ComfyUI\utils\__init__.py)

Cannot import D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BiRefNet-ZHO module for custom nodes: cannot import name 'check_download_model' from 'utils' (D:\ComfyUI_windows_portable\ComfyUI\utils\__init__.py)

AugmentedRealityCat avatar Sep 11 '24 09:09 AugmentedRealityCat

solve like this: .....\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\update run Update_comfyui image

MrBin-Vietnhat avatar Sep 11 '24 09:09 MrBin-Vietnhat

Traceback (most recent call last): File "E:\sd-webui-aki\ComfyUI-aki-v1.2\nodes.py", line 1993, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in call_with_frames_removed File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO_init.py", line 1, in from . import birefnet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\birefnet.py", line 7, in from models.baseline import BiRefNet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\models\baseline.py", line 16, in from models.refinement.refiner import Refiner, RefinerPVTInChannels4, RefUNet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\models\refinement\refiner.py", line 11, in from dataset import class_labels_TR_sorted File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\dataset.py", line 10, in from utils import path_to_image ImportError: cannot import name 'path_to_image' from 'utils' (E:\sd-webui-aki\ComfyUI-aki-v1.2\utils_init_.py)

hillleaf avatar Sep 11 '24 11:09 hillleaf

Traceback (most recent call last): File "E:\sd-webui-aki\ComfyUI-aki-v1.2\nodes.py", line 1993, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in call_with_frames_removed File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO__init_.py", line 1, in from . import birefnet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\birefnet.py", line 7, in from models.baseline import BiRefNet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\models\baseline.py", line 16, in from models.refinement.refiner import Refiner, RefinerPVTInChannels4, RefUNet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\models\refinement\refiner.py", line 11, in from dataset import class_labels_TR_sorted File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\dataset.py", line 10, in from utils import path_to_image ImportError: cannot import name 'path_to_image' from 'utils' (E:\sd-webui-aki\ComfyUI-aki-v1.2\utils__init__.py)

image

MrBin-Vietnhat avatar Sep 11 '24 13:09 MrBin-Vietnhat

可以用ComfyUI_BiRefNet_ll插件,新老模型都支持

lldacing avatar Sep 14 '24 07:09 lldacing

Traceback (most recent call last): File "E:\sd-webui-aki\ComfyUI-aki-v1.2\nodes.py", line 1993, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in call_with_frames_removed File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO__init_.py", line 1, in from . import birefnet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\birefnet.py", line 7, in from models.baseline import BiRefNet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\models\baseline.py", line 16, in from models.refinement.refiner import Refiner, RefinerPVTInChannels4, RefUNet File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\models\refinement\refiner.py", line 11, in from dataset import class_labels_TR_sorted File "E:\sd-webui-aki\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-BiRefNet-ZHO\dataset.py", line 10, in from utils import path_to_image ImportError: cannot import name 'path_to_image' from 'utils' (E:\sd-webui-aki\ComfyUI-aki-v1.2\utils__init__.py)

image

utils.py改为myutils.py,然后dataset.py第10行将utils改为myutils,完美解决。

liutianping avatar Oct 06 '24 15:10 liutianping