TTPlanetPig / Comfyui_JC2

Apache License 2.0
70 stars 5 forks source link

问题:object of type 'NoneType' has no len() #8

Open tholiite opened 1 week ago

tholiite commented 1 week ago

ComfyUI Error Report

Error Details


## System Information
- **ComfyUI Version:** v0.2.3
- **Arguments:** main.py --windows-standalone-build
- **OS:** nt
- **Python Version:** 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
- **Embedded Python:** false
- **PyTorch Version:** 2.4.1+cu124
## Devices

- **Name:** cuda:0 NVIDIA GeForce RTX 3080 : cudaMallocAsync
  - **Type:** cuda
  - **VRAM Total:** 10736762880
  - **VRAM Free:** 5725170576
  - **Torch VRAM Total:** 7516192768
  - **Torch VRAM Free:** 3936897936
TTPlanetPig commented 1 week ago

This issue is most likely due to the version of peft try to update to the required 0.12.0 for comfyui windows version under python_embeded folder ./python.exe -m pip install peft==0.12.0

TTPlanetPig commented 1 week ago

and also, please check if you have correctly put the Joy caption model into the folder. this one will not be auto downloaded!! -Joy capiton lora: https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two download all files and place in ComfyUI\models\Joy_caption\cgrkzexw-599808, i will suggest you use huggingface-cli to avoid mistaken on the names.

KannManMachen commented 1 week ago

Hey @TTPlanetPig – first of all THX a lot for this great custom node :) ! I am currently testing different vision models against each other. JoyCaption is really strong!

I had the same error object of type ‘NoneType’ has no len()

I found the instructions for installing the JoyCaption lora (is it really a “lora”?) somewhat misleading.

If you visit the URL https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two, you get to a hugging face space / app and not to the overview of the stored data. This would then be the link https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two/tree/main.

And then I was confused by the subfolder “cgrkzexw-599808” inside of the folder structure on the HF page, because you had written that the corresponding data in ComfyUI should be copied to a subfolder “cgrkzexw-599808” (...\models\Joy_caption\cgrkzexw-599808). At first I didn't know if I could ignore the data on the first level and only need the data in the “cgrkzexw-599808” folder. Answer: you really need all data from https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two/tree/main inklusive the folder “cgrkzexw-599808”

However, this only seemed to be important for the manual download option. In the end, I was able to download the complete dataset with the command git clone https://huggingface.co/spaces/fancyfeast/joy-caption-alpha-two C:\test.

Cheers

AssassinsLament commented 5 days ago

I have had this issue before, and after checking to make sure all the models are in the correct place, I realized that it wasn't loading the LLM model into memory. Because of how I set my clip and vae into specific cpu/gpu, some how it couldn't load the unsloth model into cuda:0... once i disabled the clip and vae forcing, it worked fine.