How to Install Comfyui_MiniCPMv2_6-prompt-generator
Install this extension via the ComfyUI Manager by searching
for Comfyui_MiniCPMv2_6-prompt-generator
1. Click the Manager button in the main menu
2. Select Custom Nodes Manager button
3. Enter Comfyui_MiniCPMv2_6-prompt-generator in the search bar
After installation, click the Restart button to
restart ComfyUI. Then, manually
refresh your browser to clear the cache and access
the updated list of nodes.
Visit
ComfyUI Online
for ready-to-use ComfyUI environment
Comfyui_MiniCPMv2_6-prompt-generator by ComfyUI enables single-image captioning, prompt generation from uploaded images, and batch-image prompt generation, enhancing image-to-text capabilities.
Comfyui_MiniCPMv2_6-prompt-generator Introduction
The Comfyui_MiniCPMv2_6-prompt-generator is an extension designed to automatically generate image labels or prompts, which can be particularly useful for AI artists working with LoRA (Low-Rank Adaptation) or DreamBooth training on flux series models. This extension leverages a fine-tuned model, MiniCPMv2_6-prompt-generator, to create natural language descriptions for images. These descriptions can be short or long prompts, making it easier to generate training data for various AI art projects.
How Comfyui_MiniCPMv2_6-prompt-generator Works
The extension works by using a fine-tuned version of the MiniCPM-V 2.6 model, which has been trained on a dataset of MidJourney prompts. This model can generate captions and prompts for images in a natural language style. The process involves uploading an image and selecting the desired caption method (single-image caption, short prompt, or long prompt). The model then processes the image and generates the corresponding text output.
Basic Workflow for Image Caption or Prompt Generation
Single-Image Caption: Upload an image and set the caption_method to "caption". The model will generate a descriptive caption for the image.
single image caption
Short Prompt Generation: Upload an image and set the caption_method to "short_prompt". The model will generate a concise prompt for the image.
short_prompt
Long Prompt Generation: Upload an image and set the caption_method to "long_prompt". The model will generate a detailed prompt for the image.
long_prompt
Image Regeneration: Use the generated prompt as input to a CLIP node to regenerate the image through a text-to-image (t2i) model.
Image regenerate
Comfyui_MiniCPMv2_6-prompt-generator Features
Single-Image Caption
Description: Generates a descriptive caption for a single image.
Customization: Set the caption_method to "caption".
Example: Upload an image of a sunset, and the model might generate a caption like "A beautiful sunset over the ocean."
Short Prompt Generation
Description: Generates a short, concise prompt for an image.
Customization: Set the caption_method to "short_prompt".
Example: Upload an image of a cat, and the model might generate a prompt like "A cute cat sitting on a windowsill."
Long Prompt Generation
Description: Generates a detailed, descriptive prompt for an image.
Customization: Set the caption_method to "long_prompt".
Example: Upload an image of a forest, and the model might generate a prompt like "A dense forest with tall trees and a narrow path winding through it."
Batch Image Caption
Description: Generates captions for multiple images in a folder.
Customization: Indicate the image folder path, and the system will read all images in the folder and generate captions for each image.
Example: Upload a folder of vacation photos, and the model will generate captions for each photo, saving them as text files with the same names as the images.
Batch image caption
Comfyui_MiniCPMv2_6-prompt-generator Models
The extension uses the MiniCPMv2_6-prompt-generator model, which is fine-tuned on a MidJourney prompt dataset. This model can generate both short and long prompts for images in a natural language style. The model is trained with over 3000 samples, including images and prompts sourced from MidJourney, and it operates efficiently with lower GPU memory usage (about 7GB) when using the int4 quantized version.
Hugging Face Model Page for more details on the MiniCPMv2_6-prompt-generator model.
These resources will help you get the most out of the Comfyui_MiniCPMv2_6-prompt-generator extension and enhance your AI art projects.
Comfyui_MiniCPMv2_6-prompt-generator Related Nodes