Nodes:Image to Text, Loader Image to Text Model.
wd-swinv2-tagger-v3
模型,显著提升了人物特征的描述准确度,特别适用于需要细腻描绘人物的场景。moondream1
模型提供了丰富的细节,但有时候可能显得冗长并缺乏准确性。相比之下,moondream2
模型以其简洁而精确的场景描述脱颖而出。因此,在使用Image2TextWithTags
节点时,对于以场景为主的文本生成,推荐moondream1
与wd-swinv2-tagger-v3
的组合;而对于注重人物描述的内容,wd-swinv2-tagger-v3
与moondream2
的搭配将是理想选择。Text2GPTPrompt
节点旨在创造高效的Prompt,该Prompt能够融合moondream
系列模型和wd-swinv2-tagger-v3
产生的关键词,为7b级别的模型定制,内含qwen1.5-7b
和deepseek-ai/deepseek-vl-7b-chat
。hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt
模型,我们能够充分发挥Qwen的潜力,特别是在生成包括古诗词在内的各式提示语时展现卓越性能。此模型经过35000条数据的特定任务微调(SFT),不仅性价比高,而且在CPU上运行的速度也相当可观。为了在ComfyUI中使用图片转换为提示(prompt)的功能,首先需要将插件的仓库克隆到您的ComfyUI custom_nodes
目录中。使用下面的命令来克隆仓库:
git clone https://github.com/zhongpei/Comfyui-image2prompt
完成这一步骤,您就可以在ComfyUI环境中启用此插件,从而高效地将图片转换为描述性提示。
模型在第一次运行时候会自动下载,如果没有正常下载,为了使插件正常工作,您需要下载必要的模型。该插件使用来自Hugging Face的 vikhyatk/moondream1
vikhyatk/moondream2
BAAI/Bunny-Llama-3-8B-V
unum-cloud/uform-gen2-qwen-500m
和 internlm/internlm-xcomposer2-vl-7b
模型。
确保您已将这些模型下载到插件的 ComfyUI/models/image2text
目录中。使用以下链接进行下载:
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download vikhyatk/moondream1 --local-dir ComfyUI/models/image2text/moondream1
huggingface-cli download --resume-download internlm/internlm-xcomposer2-vl-7b --local-dir ComfyUI/models/image2text/internlm-xcomposer2-vl-7b
huggingface-cli download --resume-download unum-cloud/uform-gen2-qwen-500m --local-dir ComfyUI/models/image2text/uform-gen2-qwen-500m
按照这些步骤操作,您将确保插件能够访问所需的模型,从而准确地将图片转换为提示,增强您的ComfyUI体验。
wd-swinv2-tagger-v3
model, which significantly enhanced the accuracy of character trait descriptions, making it particularly suitable for scenarios requiring detailed depiction of characters.moondream1
model offers rich details but might sometimes appear verbose and lack precision. In contrast, the moondream2
model stands out for its concise and accurate scene descriptions. Therefore, when using the Image2TextWithTags
node, for text generation centered on scenes, a combination of moondream1
and wd-swinv2-tagger-v3
is recommended; for content focusing on character descriptions, pairing wd-swinv2-tagger-v3
with moondream2
is the ideal choice.Text2GPTPrompt
node is designed to create efficient prompts that can integrate keywords generated by the moondream
series models and wd-swinv2-tagger-v3
, customized for models at the 7b level, including qwen1.5-7b
.hahahafofo/Qwen-1_8B-Stable-Diffusion-Prompt
model, we can fully leverage the potential of Qwen, especially in generating various forms of prompts, including classical poetry. This model, fine-tuned with 35,000 pieces of data for specific tasks (SFT), not only offers a high cost-performance ratio but also runs at a considerable speed on CPUs.To integrate the Image-to-Prompt feature with ComfyUI, start by cloning the repository of the plugin into your ComfyUI custom_nodes
directory. Use the following command to clone the repository:
git clone https://github.com/zhongpei/Comfyui-image2prompt
This step is crucial for enabling the plugin within the ComfyUI environment, facilitating the efficient transformation of images into descriptive prompts.
The model will be automatically downloaded the first time it is run. If it does not download normally, for the plugin to function properly, you need to download the necessary models. This plugin utilizes the vikhyatk/moondream1
vikhyatk/moondream2
unum-cloud/uform-gen2-qwen-500m
and internlm/internlm-xcomposer2-vl-7b
models from Hugging Face. Make sure to download these models into the plugin's ComfyUI/models/image2text
directories, respectively. Use the following links for downloading:
huggingface-cli download --resume-download vikhyatk/moondream1 --local-dir ComfyUI/models/image2text/moondream1
huggingface-cli download --resume-download vikhyatk/moondream2 --local-dir ComfyUI/models/image2text/moondream2
huggingface-cli download --resume-download internlm/internlm-xcomposer2-vl-7b --local-dir ComfyUI/models/image2text/model/internlm-xcomposer2-vl-7b
huggingface-cli download --resume-download unum-cloud/uform-gen2-qwen-500m --local-dir ComfyUI/models/image2text/model/uform-gen2-qwen-500m
By completing these steps, you'll ensure that the plugin has access to the necessary models, enabling it to accurately convert images into prompts, thereby enhancing your ComfyUI experience.