fireicewolf / wd-llm-caption-cli

A Python base cli tool for caption images with WD series, Joy-caption-pre-alpha,meta Llama 3.2 Vision Instruct and Qwen2 VL Instruct models.
Apache License 2.0
20 stars 6 forks source link

Error when using "uncensored" joy config #2

Closed moonwhaler closed 1 month ago

moonwhaler commented 2 months ago

After using the "uncensored" joy config, i get the following error message:

python caption.py --joy_config configs/uncensored_joy.json /images/fun/RDBMS_Genealogy_V5.jpg 2024-09-09 00:41:12,099 - logger.py[line:30] - WARNING: save_log not enable or log file path not exist, log will only output in console. 2024-09-09 00:41:12,099 - caption.py[line:78] - INFO: Set log level to "INFO" 2024-09-09 00:41:12,099 - download.py[line:83] - INFO: Using config: /home/chis/AI/wd-joy-caption-cli/configs/default_wd.json 2024-09-09 00:41:12,100 - download.py[line:103] - INFO: Model and csv will be stored in models/wd-swinv2-v3. 2024-09-09 00:41:12,140 - download.py[line:121] - INFO: Will download onnx model from Huggingface repo: SmilingWolf/wd-swinv2-tagger-v3 2024-09-09 00:41:20,749 - download.py[line:133] - INFO: Will download tags csv from Huggingface repo: SmilingWolf/wd-swinv2-tagger-v3 2024-09-09 00:41:20,967 - download.py[line:252] - INFO: Using config: configs/uncensored_joy.json 2024-09-09 00:41:20,974 - download.py[line:261] - ERROR: "Joy-Caption-Pre-Alpha" NOT FOUND IN CONFIG! Traceback (most recent call last): File "/home/chris/AI/wd-joy-caption-cli/caption.py", line 537, in <module> main(get_args) File "/home/chris/AI/wd-joy-caption-cli/caption.py", line 116, in main image_adapter_path, clip_path, llm_path = download_joy( File "/home/chris/AI/wd-joy-caption-cli/utils/download.py", line 265, in download_joy model_info = read_json(config_file, model_name) File "/home/chris/AI/wd-joy-caption-cli/utils/download.py", line 262, in read_json raise FileNotFoundError FileNotFoundError

Using the default configs is no issue. The "Joy-Caption-Pre-Alpha" is existing in the models folder. Having the "clip", llm" and "image_adapter" subfolders.

fireicewolf commented 1 month ago

If you want use configs/uncensored_joy.json, add arg --joy_model_name Joy-Caption-Uncensored You can check it in configs/uncensored_joy.json. By the way, uncensored_joy only change llama3.1 8B to an uncensored version, so joy-caption-pre-alpha and siglip-so400m-patch14-384(Google) are same, you can make a soft link avoid disk usage many more.