ComfyUI_FluxPromptGen

ComfyUI_FluxPromptGen
★ 18

提示词生成图像字幕ComfyUI 扩展模型集成
为 ComfyUI 提供定制化提示词生成与图像字幕功能,整合大语言模型与 Florence-2,便于在工作流中灵活操控提示风格与结构。
💡 在 ComfyUI 流程中生成详细提示词并自动为图像生成描述。
🍴 5 Forks💻 Python🔄 2024-09-23
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/af9fbf81e746
📦 requirements.txt
torch
transformers
Pillow
numpy
sentencepiece
workflow
📄 README

Flux Prompt Generator for ComfyUI (use ollama llms to enhance prompts)

Overview

PORT OF https://huggingface.co/Aitrepreneur/FLUX-Prompt-Generator for COMFYUI

Flux Prompt Generator is a custom node set for ComfyUI that enhances prompt generation and image captioning capabilities. It integrates advanced language models and image captioning techniques to provide versatile and powerful prompt manipulation tools for your AI image generation workflows.

Features

  • Flux Prompt Generator Node: Generates detailed prompts for image generation, with customizable parameters and styles.
  • Flux Image Caption Node: Utilizes the Florence-2 model to generate detailed captions for input images.
  • Seamless integration with ComfyUI workflows.
  • Support for various prompt styles and customization options.
  • Installation

  • Ensure you have ComfyUI installed and set up.
  • Clone this repository into your ComfyUI custom nodes directory:
  • “`

    git clone https://github.com/your-username/ComfyUI_FluxPromptGen.git

    “`

  • Install the required dependencies:
  • “`

    pip install -r requirements.txt

    “`

    Usage

    Flux Prompt Generator Node

  • In ComfyUI, locate the “Flux Prompt Generator” node.
  • Connect it to your workflow.
  • Adjust the input parameters as needed:
  • Seed: Set a seed for reproducible results.
  • Custom Input Prompt: Add your base prompt (optional).
  • Subject: Specify the main subject of the image.
  • Various style options: Customize the generated prompt.
  • Flux Image Caption Node

  • Find the “Flux Image Caption” node in ComfyUI.
  • Connect an image output to this node.
  • Set the maximum length for the generated caption.
  • The node will produce a detailed caption of the input image using the Florence-2 model.
  • File Structure

  • flux_prompt_generator_node.py: Contains the main Flux Prompt Generator node implementation.
  • flux_image_caption_node.py: Implements the Flux Image Caption node using the Florence-2 model.
  • __init__.py: Initializes the custom nodes for ComfyUI.
  • requirements.txt: Lists all the required Python packages.
  • prompts/: Directory containing saved prompts and examples.
  • Requirements

    you need ollama running on ur pc

    u need some ollama model downloaded

    Contributing

    Contributions to the Flux Prompt Generator are welcome! Please feel free to submit pull requests, create issues or suggest improvements.

    License

    [Specify your license here, e.g., MIT, GPL, etc.]

    Acknowledgements

  • This project uses the Florence-2 model from Microsoft for image captioning.
  • Special thanks to the ComfyUI community for their support and inspiration.