pzc163 / Comfyui_MiniCPMv2_6-prompt-generator

a comfyui node for automatic generate image label for running lora or dreambooth training on flux series models
Apache License 2.0
66 stars 7 forks source link

Comfyui_MiniCPMv2_6-prompt-generator

This comfyui node can automatic generate image label or prompt for running lora or dreambooth training on flux series models by fine-tuned model: MiniCPMv2_6-prompt-generator

Above model fine-tuning based on int4 quantized version of MiniCPM-V 2.6. The fine-tuned model is trained on a midjourney prompt dataset and is trained with 2x 4090 24GB GPUs. this model is trained with more than 3000 samples which contain images and prompts source from Midjourney.The model can generate short prompts and long prompts for images with natural language style. It can be used for making image labels when lora training. Running with int4 version would use lower GPU memory (about 7GB).


Basic workflow for Image caption or Prompt gererate

Batch image caption:

For batch images caption, User can indicate the image folder path, system will read all images in the folder and put generated caption of the image as text file by the same as image's file name, the example workflow under the workflow folder as below:

Batch image caption

Installation


pip install -r requirements.txt

Model Download


The models will be downloaded automatically when running the workflow if they are not found in the ComfyUI\models\LLM\ directory.

You can download the MiniCPMv2_6-prompt-generator model manually follow the link.