ZHO-ZHO-ZHO / ComfyUI-BiRefNet-ZHO

Better version for BiRefNet in ComfyUI | Both img & video
GNU General Public License v3.0
268 stars 22 forks source link

utils.py模块无法导入 path_to_image #16

Open dflhuang111 opened 3 months ago

dflhuang111 commented 3 months ago

提示ComfyUI/comfy/utils.py模块无法导入 path_to_image,查了文件确实也没有,comfyui已更新到最新 Traceback (most recent call last): File "/mnt/workspace/ComfyUI/nodes.py", line 1890, 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 "/mnt/workspace/ComfyUI/custom_nodes/ComfyUI-BiRefNet-ZHO/init.py", line 1, in from . import birefnet File "/mnt/workspace/ComfyUI/custom_nodes/ComfyUI-BiRefNet-ZHO/birefnet.py", line 7, in from models.baseline import BiRefNet File "/mnt/workspace/ComfyUI/custom_nodes/ComfyUI-BiRefNet-ZHO/models/baseline.py", line 16, in from models.refinement.refiner import Refiner, RefinerPVTInChannels4, RefUNet File "/mnt/workspace/ComfyUI/custom_nodes/ComfyUI-BiRefNet-ZHO/models/refinement/refiner.py", line 11, in from dataset import class_labels_TR_sorted File "/mnt/workspace/ComfyUI/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' (/mnt/workspace/ComfyUI/comfy/utils.py)

royaiagent commented 3 months ago

这个问题你解决了吗?

laitianwen commented 2 months ago

兄弟,这个问题解决了吗?

zgglj2 commented 1 month ago

估计是和另外哪里的utils模块冲突了,把utils.py复制一份为myutils.py,然后把dataset.py中的from utils import path_to_image改为from myutils import path_to_image,就不会报错了

erinsrc commented 1 month ago

zgglj2 所说的方法可行,冲突解决了