Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import failing due to invalid path // Win10 // Onnx 1.17.3 // CUDA 11.8 #48

Open
ThePowerOfElectricity opened this issue Apr 15, 2024 · 1 comment

Comments

@ThePowerOfElectricity
Copy link

ThePowerOfElectricity commented Apr 15, 2024

Good day!

I've recently moved from a Ubuntu to a Windows 10 operating system and found this odd issue with the WD14 tagger Add-on.
The repo code is pasted into a folder in the custom_nodes directory with the full requirements installed. I even made sure to hit the right onnx version and CUDA libraries as stated in some other issues with failing imports.

Still, the import fails with the same error about an invalid path. The path that is stated is available, though only with single backslashes.
The log shows:

D:\IT\Comfy\ComfyUI-master>main.py
Total VRAM 24564 MB, total RAM 32509 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
VAE dtype: torch.bfloat16
Using pytorch cross attention
Traceback (most recent call last):

File "D:\IT\Comfy\ComfyUI-master\nodes.py", line 1800, in load_custom_node
  module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "D:\IT\Comfy\ComfyUI-master\custom_nodes\ComfyUI-WD14-Tagger-main\__init__.py", line 3, in <module>
  if init(check_imports=["onnxruntime"]):
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\IT\Comfy\ComfyUI-master\custom_nodes\ComfyUI-WD14-Tagger-main\pysssss.py", line 159, in init
  install_js()
File "D:\IT\Comfy\ComfyUI-master\custom_nodes\ComfyUI-WD14-Tagger-main\pysssss.py", line 128, in install_js
  shutil.rmtree(dst_dir)
File "C:\Users\Beast\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 820, in rmtree
  return _rmtree_unsafe(path, onexc)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Beast\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 624, in _rmtree_unsafe
  onexc(os.scandir, path, err)
File "C:\Users\Beast\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 621, in _rmtree_unsafe
  with os.scandir(path) as scandir_it:
       ^^^^^^^^^^^^^^^^
NotADirectoryError: [WinError 267] The directory name is invalid: 'D:\\IT\\Comfy\\ComfyUI-master\\web\\extensions\\pysssss/WD14Tagger'

Cannot import D:\IT\Comfy\ComfyUI-master\custom_nodes\ComfyUI-WD14-Tagger-main module for custom nodes: [WinError 267] The directory name is invalid: 'D:\\IT\\Comfy\\ComfyUI-master\\web\\extensions\\pysssss/WD14Tagger'

Import times for custom nodes:
 0.0 seconds: D:\IT\Comfy\ComfyUI-master\custom_nodes\Image-Captioning-in-ComfyUI-main
 0.0 seconds (IMPORT FAILED): D:\IT\Comfy\ComfyUI-master\custom_nodes\ComfyUI-WD14-Tagger-main

Starting server

To see the GUI go to: http://127.0.0.1:8188`

Does anyone have an idea on how to fix this? (Safe from switching my whole computer back to Linux, that is)
Greetings, TPoE

@ertu110
Copy link

ertu110 commented Apr 19, 2024

try change ComfyUI-WD14-Tagger-main to ComfyUI-WD14-Tagger

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

No branches or pull requests

2 participants