Joy Caption是comfyui中反推提示词(也可以用来打标签)的插件,作为自然语言的反推效果还是很不错的,可以搭配适合自然语言的大模型来出图。
项目地址:https://github.com/StartHua/Comfyui_CXH_joy_caption
安装也不算麻烦,就是要求transformers>=4.43.3,否则就报如下错误:
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. !!! Exception during processing !!! `rope_scaling` must be a dictionary with with two fields, `type` and `factor`, got {'factor': 8.0, 'high_freq_factor': 4.0, 'low_freq_factor': 1.0, 'original_max_position_embeddings': 8192, 'rope_type': 'llama3'}
解决的办法就是按照要求安装对应版本的transformers
执行命令:pip install transformers==4.43.3
这个版本的确够新,有可能会导致其他使用了低版本的transformers的插件无法正常使用,所以请谨慎安装!
有时候会报另外一个错:
Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.
!!! Exception during processing !!! No package metadata was found for bitsandbytes
此时把bitsandbytes重新安装一下就解决了。