dimtoneff / ComfyUI-PixelArt-Detector

Generate, downscale, change palletes and restore pixel art images with SDXL.
MIT License
174 stars 10 forks source link

Fresh ComfyUI install, getting "(IMPORT FAILED): \custom_nodes\ComfyUI-PixelArt-Detector" #6

Closed brand-brothers closed 11 months ago

brand-brothers commented 11 months ago

Hi, Sorry if this is a dumb question, but I followed the steps in the readme. As it didn't work, I did a fresh ComfyUI install and checked my python & dependancies were up to date. Added the pixelart Lora in the Loras folder, and the StableXL checkpoint in the checkpoints folder. Then launched the git clone commands from the "custom_nodes" folder, they appeared to install with no errors. But when I launch ComfyUI, I get this :

_File "X:\ComfyUI\custom_nodes\ComfyUI-PixelArt-Detector\pixelUtils.py", line 3, in import cv2 ModuleNotFoundError: No module named 'cv2'

Cannot import X:\ComfyUI\custom_nodes\ComfyUI-PixelArt-Detector module for custom nodes: No module named 'cv2' Loading: Save as Webp Copying JS files for Workflow loading

Import times for custom nodes: 0.0 seconds: X:\ComfyUI\custom_nodes\ComfyUI-Saveaswebp 0.0 seconds (IMPORT FAILED): E:\ComfyUI\customnodes\ComfyUI-PixelArt-Detector

Of course I got 4 red rectangles in Comfy, and an error popping up on:

PixelArtLoadPalettes PixelArtDetectorConverter PixelArtDetectorToImage PixelArtDetectorSave

So I'm stuck... Anyone got the same issue ? What am I doing wrong ? Thank you.

brand-brothers commented 11 months ago

Ok nevermind, I fixed it myself by copying the cv2 folder manually in the dependancies folder created by the Comfy install.

dimtoneff commented 11 months ago

Weird thing is I already have had the cv2 inside my Comfy venv. Seems that another custom node might have installed it. I will add this to the requirements. Thank you for rerporting it.

dimtoneff commented 11 months ago

Pushed a fix.

brand-brothers commented 10 months ago

Awesome, thanks ! :)

nour-s commented 2 weeks ago

I'm still getting the same issue, I just downloaded this for the first time !

dimtoneff commented 1 week ago

in your venv environment: pip install opencv-python>=4.8.0

does it work?