ComfyUI Extension: ComfyUI-PromptsO

Authored by S4MUEL-404

Created

Updated

1 stars

A comprehensive AI API integration and prompt processing toolkit for ComfyUI, providing powerful text and image generation capabilities with advanced prompt manipulation tools.

Custom Nodes (0)

    README

    ComfyUI-PromptsO

    Version: 1.1.0

    A comprehensive AI API integration and prompt processing toolkit for ComfyUI, providing powerful text and image generation capabilities with advanced prompt manipulation tools.

    πŸš€ Features

    AI API Integration

    • πŸ’€Image with Gemini - Generate images using Google Gemini API with your own API key
    • πŸ’€Image with Grok - Generate images using Grok AI API with your own API key
    • πŸ’€Text with Deepseek - Generate text using Deepseek AI API with your own API key
    • πŸ’€Text with Gemini - Generate text using Google Gemini API with your own API key
    • πŸ’€Text with OpenAI - Generate text using OpenAI GPT API with your own API key
    • πŸ’€Text with Grok - Generate text using Grok AI API with your own API key

    Prompt Processing Tools

    • πŸ’€Prompts Combine - Merge multiple prompts with customizable separators
    • πŸ’€Prompts Input - Advanced prompt input with multiline support
    • πŸ’€Prompts Split - Split prompts by delimiters into separate outputs
    • πŸ’€Prompts Replace - Replace text patterns using regex or simple text matching
    • πŸ’€Prompts from Janus Pro - Extract and process prompts from Janus Pro model

    πŸ“¦ Installation

    Method 1: ComfyUI Manager (Recommended)

    1. Open ComfyUI Manager
    2. Search for "PromptsO" or "S4MUEL"
    3. Click Install
    4. Restart ComfyUI

    Method 2: Manual Installation

    1. Navigate to your ComfyUI custom_nodes directory:
      cd ComfyUI/custom_nodes/
      
    2. Clone this repository:
      git clone https://github.com/S4MUEL-404/ComfyUI-PromptsO.git
      
    3. Install dependencies:
      pip install -r ComfyUI-PromptsO/requirements.txt
      
    4. Restart ComfyUI

    πŸ”§ Dependencies

    The plugin automatically manages its dependencies:

    • Pillow (PIL) - Image processing
    • NumPy - Numerical operations
    • Requests - API communications
    • Torch - Deep learning operations
    • Transformers - AI model handling
    • Additional AI libraries - Advanced API integrations

    πŸ“– Usage

    AI API Nodes

    Image Generation:

    1. Find Nodes: All nodes are prefixed with πŸ’€ in the ComfyUI node browser
    2. Categories: Look under "πŸ’€S4PromptsO" category
    3. API Keys: Enter your own API keys for full control and privacy
    4. Configuration: Each node provides specific parameters for optimal results

    Text Generation:

    1. Add any text generation node to your workflow
    2. Enter your API key and prompt
    3. Configure parameters like temperature, max tokens, etc.
    4. Execute workflow to generate text

    Prompt Processing Nodes

    Combining Prompts:

    • Use πŸ’€Prompts Combine to merge multiple prompt inputs
    • Customize separators and formatting
    • Perfect for complex multi-part prompts

    Splitting Prompts:

    • Use πŸ’€Prompts Split to divide prompts by delimiters
    • Useful for batch processing or multi-output workflows
    • Supports custom delimiter patterns

    Text Replacement:

    • Use πŸ’€Prompts Replace for pattern matching and replacement
    • Supports both regex and simple text matching
    • Essential for dynamic prompt modification

    🎯 Key Features

    • βœ… Multiple AI APIs - Support for major AI providers with your own keys
    • βœ… Privacy Focused - No data stored, direct API communication
    • βœ… Advanced Prompting - Comprehensive prompt manipulation tools
    • βœ… Production Quality - Enterprise-grade error handling and logging
    • βœ… Flexible Integration - Compatible with existing ComfyUI workflows
    • βœ… Cost Control - Use your own API keys for transparent billing

    πŸ“ Project Structure

    ComfyUI-PromptsO/
    β”œβ”€β”€ py/                 # Core node implementations
    β”‚   β”œβ”€β”€ imageGemini.py  # Gemini image generation
    β”‚   β”œβ”€β”€ imageGrok.py    # Grok image generation
    β”‚   β”œβ”€β”€ textDeepseek.py # Deepseek text generation
    β”‚   β”œβ”€β”€ textGemini.py   # Gemini text generation
    β”‚   β”œβ”€β”€ textOpenAI.py   # OpenAI text generation
    β”‚   β”œβ”€β”€ textGrok.py     # Grok text generation
    β”‚   β”œβ”€β”€ promptsCombine.py    # Prompt combination
    β”‚   β”œβ”€β”€ promptsInput.py      # Advanced prompt input
    β”‚   β”œβ”€β”€ promptsSplit.py      # Prompt splitting
    β”‚   β”œβ”€β”€ promptsReplace.py    # Text replacement
    β”‚   └── promptsFromJanusPro.py # Janus Pro integration
    β”œβ”€β”€ cache/              # API response cache
    β”œβ”€β”€ summary_md/         # Development documentation
    β”œβ”€β”€ __init__.py         # Plugin initialization
    β”œβ”€β”€ s4_logger.py        # Logging system
    └── requirements.txt    # Python dependencies
    

    🀝 Contributing

    Contributions are welcome! Please feel free to submit pull requests or report issues.

    πŸ“œ License

    This project is open source. Please respect the licensing terms.


    Author: S4MUEL
    Website: s4muel.com
    GitHub: https://github.com/S4MUEL-404/ComfyUI-PromptsO