Nodes Browser

ComfyDeploy: How ComfyUI_FluxPromptGen works in ComfyUI?

What is ComfyUI_FluxPromptGen?

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. NOTE:PORT OF [a/https://huggingface.co/Aitrepreneur/FLUX-Prompt-Generator](https://huggingface.co/Aitrepreneur/FLUX-Prompt-Generator) for COMFYUI

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ComfyUI_FluxPromptGen and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

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.

workflow

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

  1. Ensure you have ComfyUI installed and set up.
  2. Clone this repository into your ComfyUI custom nodes directory:
    git clone https://github.com/your-username/ComfyUI_FluxPromptGen.git
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    

Usage

Flux Prompt Generator Node

  1. In ComfyUI, locate the "Flux Prompt Generator" node.
  2. Connect it to your workflow.
  3. 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

  1. Find the "Flux Image Caption" node in ComfyUI.
  2. Connect an image output to this node.
  3. Set the maximum length for the generated caption.
  4. 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.