-
Notifications
You must be signed in to change notification settings - Fork 219
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
Error when excuting LineArtPreprocessor #119
Comments
I'm gonna be annoying and not give you an answer, so sorry. I'm having the same exact problem. It's not just LineArtPreprocessor that's not working. Most of them are not. Canny is the only one that works, which I think comes pre-installed with Comyfui. I tried installing and uninstalling Controlnet_Aux, tried deleting the folder, tried using the install.bat, tried a fresh install of Comfyui, and tried updating it. Nothing. |
[Errno 2] No such file or directory: 'C:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\lllyasviel/Annotators\cache\models--lllyasviel--Annotators\blobs\c686ced2a666b4850b4bb6ccf0748031c3eda9f822de73a34b8979970d90f0c6.incomplete' File "C:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute Close |
No worries! I'm glad I'm not the only one. Yeah I realized it's all the preprocessors except "inpainting" and "canny" for whatever reason. I'm not really sure, my guess is there's some kind of file path, but I couldn't figure it out. I've tried redownloading. I tried messing around with the file config file, but I was just guessing and it didn't lead to anything |
@TruckMan19 @BagGuyArt Try to delete |
Same issue. I even tried reinstalling it using a git clone instead (tried reinstalling it both ways). Are there any steps post-manager-installation that we're missing? I don't want to speak for TruckMan19 but I know I'm fully capable of being and idiot and missing obvious shit. |
I still get the same error unfortunately. What I realize, is when you install for the first time, the "CKPT" folders is not present in the first install. Then when you launch comfyUI for the first time, the CKPT folder is created within the "comfyui_controlnet_aux" folder. So I would think maybe something is going wrong here? Am I supposed to download something after installation? Or should I type in a different path and get the program to look for the CKPTs in a different location?
On startup I get this message in the CMD. And that folder is essentially empty except for some other folders. I'm thinking the issue is here perhaps? This might be over my head, but what is supposed to be in the CKPT folder? I had thought that's where the controlnet models themselves were supposed to reside? My controlnet models are saved and download elsewhere though.
Also just to include some more details I get that message, it looks like it's trying to do a huggingface download maybe? "Custom_hf_download". Is that maybe the issue? Should I be downloading something from HF? |
@Fannovel16 I think I understand the problem possibly, and I was wondering if you could help out. When the extension is fully installed and properly functioning, where are the actual Checkpoints of the controlnet models located? What is the full directory? I think the issue is right now, after you install the extension, then run the code, it's trying to download the checkpoints for the various controlnet methods but running into an error. I already have all the controlnet models manually downloaded, so can I just create a folder and paste them in there. I'm trying to follow the code but struggling a bit, what is the first script that's triggered when you try to run a preprocessor? I can try and figure out from there |
It's |
Cheers. Will take a look, I know a little bit of python this is actually a great way to learn more. It's one thing to write a script, but a project like this, with multiple files interacting with each other is great. It is tough to follow at times, I need to look into how to run the code line by line and inspect the variables each step of the way. And yes you're right, that is the line that's throwing the error around that line. I tried to add a line "print(annotator_ckpts_path)" and some of the other variables to see what path it was actually referencing but I couldn't see any output. Might need to try something else. What exactly is it trying to download from HF? The controlnet checkpoints? I can download those manually, I just don't know what filepath they would go in. Would you be able to tell me what directory the checkpoints are supposed to end up in? I can try to just do it manually see if that fixes it. The issue seems to be post install, it doesn't seem to know where to find the actual checkpoints for the models. Not sure why. I also tried modifying the YAML file, to point it straight to the folder containing the controlnet CKPTS but no dice. My models are also .safetensor, I noticed the code was explicitly looking for ".ckpts" so I might try that as well see if that fixes it. |
@TruckMan19 It downloads preprocessor models making the hint image for ControlNet, not the ControlNet itself. They are not the same thing. Most preprocessors are also neural networks |
Oh damn I'm dumb. Gotcha, that makes a lot more sense. Hm, ok. |
Hey not sure if you got this to work or not but I just "figured it out". What worked for me: I just did a fresh ComfyUI install on a thumbdrive, then I manually installed (git clone) this repo and then I tried using lineart preprocessor (and a few others) and it worked, it went ahead and downloaded the right models. So then I ust copied the entire "comfyui_controlnet_aux" folder from my new install to my old install and it worked. What I think would also work: Go to your "Annotators" folder in this file path: In that folder maybe clear out everything. Then in that location, download the files from here: https://huggingface.co/lllyasviel/Annotators/tree/main So at the end of the day your annotator folder should just have these "pth" and ".pt" files. These files seem to be to be the preprocessing files that the code is trying to download when it's throwing an error. So manually installing them might be a workaround. You can try to just do one as a test if you want, looks like realistic lineart uses:"sk_model.pth" and "sk_model2.pth". So try to download those two from the link above, and then try using lineart preprocessor. If that doesn't work, you can just do what i did. Install comfyUI fresh on a new thumbdrive so your existing one doesn't get wiped out and you can just run the preprocessors on a sample image, and then copy it over. Hope it works for you. |
Thank you so much for your help, really appreciate it. Finally got it working, bit of a workaround, must be something on my install that's causing a conflict. Can I ask you a python question if you don't mind? Is it possible to try to debug this kind of stuff using "print" commands? For instance if I think the problem is with "annotator_ckpts_path", can I try to print the variable to see where the code is actually looking? I tried using print and it didn't output the result anywhere, so wondering if there's a better way possibly of doing it. At any rate, thank you very much! I hope to get good enough at Python one day to be able to do work similar to what you have here. |
Besides if you want to print some thing, you can use log function from
Hope my answer will help you. |
@TruckMan19 Sorry for the very late response. WOrked like a charm! THanks! Helping me to kick my A1111 habit. |
Moving to #264 |
Error occurred when executing LineArtPreprocessor:
[Errno 2] No such file or directory: 'D:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts\lllyasviel/Annotators\cache\models--lllyasviel--Annotators\blobs\c686ced2a666b4850b4bb6ccf0748031c3eda9f822de73a34b8979970d90f0c6.incomplete'
I'm trying to run the Lineart preprocessor as part of a workflow I saw online, and it suggested using Controlnet_Aux. When it gets to the "Realistic lineart" node, it throws the error. Above.
Not entirely sure what to make of this. It looks like it's looking for a lineart model in a subfolder? Is there a way to redirect it? I have lineart controlnet models downloaded, but in my regular controlnet/models path. Just a bit confused about what to do here. if you have any guidance would really appreciate it.
The text was updated successfully, but these errors were encountered: