# COMFYUI NODES FOR AI PROMPT ENGINEERING & METADATA

IntelliPrompt - Advanced
AI Prompt Engineering for ComfyUI

Create detailed, context-rich prompts for image generation by analyzing reference images with GPT-4o, enhancing text prompts, and preserving metadata for production workflows.

Get started with IntelliPrompt to enhance your image generation workflows. Our ComfyUI nodes help you craft more effective prompts by analyzing reference images, adding rich context to your generations, and preserving metadata for production pipelines with intelligent project organization.
Feature 1
Image Analysis
Feature 2
Prompt Enhance
Feature 3
Reference Integration
Feature 4
Metadata Preservation
Feature 5
Project Organization

IntelliPrompt Documentation

A powerful ComfyUI node for assembling detailed prompts with reference images, using GPT-4o for image analysis and prompt enhancement.

IntelliPrompt helps you create detailed, context-rich prompts for image generation by analyzing reference images using GPT-4o, enhancing text prompts with additional details, combining multiple reference images with specific roles, and providing context through storyboards, backstories, and shot descriptions.

Overview

IntelliPrompt is a powerful ComfyUI node for assembling detailed prompts with reference images, using GPT-4o for image analysis and prompt enhancement.

IntelliPrompt Node

The standard node for single prompt generation with GPT-4o image analysis. It combines reference images, text inputs, and AI enhancement to create comprehensive prompts for image generation.

Key Features

  • GPT-4o image analysis for detailed reference descriptions
  • AI-powered prompt enhancement with adjustable detail levels
  • Multiple reference image inputs with specific roles
  • Comprehensive metadata output for workflow tracking
  • Batch processing capabilities for multiple prompts

Node Types

  • IntelliPrompt: The standard node for single prompt generation
  • IntelliPrompt Batch: For processing multiple prompts from a text file
  • IntelliSave: For saving images with IntelliPrompt metadata
IntelliPrompt Node Click to enlarge

Production-Ready Features

IntelliPrompt is designed with professional production workflows in mind, offering two key advantages that set it apart:

Exceptional Storyboard Adherence

IntelliPrompt excels at maintaining precise visual fidelity to storyboard references, ensuring that:

  • Spatial relationships between elements are preserved exactly
  • Character positioning matches the reference precisely
  • Composition and framing follow the storyboard faithfully
  • Perspective and depth cues are maintained accurately

This level of precision is critical for production environments where visual continuity and adherence to the director's vision are paramount.

Comprehensive Metadata Management

The IntelliSave node provides production-grade metadata handling that:

  • Enables robust asset tracking throughout the production pipeline
  • Facilitates version control and iteration history
  • Ensures workflow reproducibility for consistent results
  • Supports quality control and visual consistency across projects
  • Integrates seamlessly with professional production tools and pipelines

In professional settings, this metadata is not just convenient—it's essential for managing complex projects, maintaining quality standards, and enabling efficient collaboration.

Input Fields

IntelliPrompt provides a comprehensive set of input fields for fine-tuning your prompt generation.

Project Information

Project ID: Combined project identifier in the format "project_ep_seq_shot" (empty by default)
Project ID Details

The Project ID field is used to organize and track assets in production pipelines. It's intelligently parsed into its components (project, episode, sequence, shot) and stored in the metadata output.

Format Examples:
MyProject_ep01_seq01_sh0001 All components
MyProject_seq01_sh0001 No episode
MyProject_ep01_sh0001 No sequence
seq01_sh0001 Just sequence and shot
Avatar2_ep03_seq042_sh0105 Real-world example
ShortFilm_sq01_sh001 Short film example

The parser intelligently identifies components by their prefixes:

  • Episode: Components starting with "ep" or "episode"
  • Sequence: Components starting with "seq", "sq", or "sc"
  • Shot: Components starting with "sh" or "shot"
  • Project: Any component without a recognized prefix (typically the first one)
Benefits of Using Project IDs:
  • Consistent naming across your production pipeline
  • Automatic folder organization when using IntelliSave
  • Easy identification of assets in large projects
  • Metadata preservation for future reference
  • Integration with production tracking systems

The Project ID field appears at the very bottom of the IntelliPrompt node UI in a specially highlighted section, making it visually distinct from other inputs for quick identification.

Main Controls

Main Prompt: The primary text prompt to enhance and combine with image references
AI Enhancement Level: Level of detail for AI enhancements: off, minimal, moderate, detailed, very detailed
Enhance Primary Prompt: Enable/disable GPT-4o enhancement of the primary prompt
Image Description Mode: How reference images are described: Off, Minimal, Basic, AI-Analyzed
Verbose Logging: Enable/disable detailed console logging

Context Inputs

Storyboard Image: A visual storyboard to provide narrative context for the scene
Mask Image: Highlight areas of particular importance (also available as output)
Backstory: Character or scene backstory to provide narrative context
Shot Description: Technical or compositional details about the specific shot

Reference Images

Character Image Reference for character appearance
Style Image Reference for art style
Environment Image Reference for scene/location
Pose Image Reference for character pose/positioning
Prop Image Reference for objects/props
Camera Image Reference for camera angle/perspective
Layout Image Reference for composition/arrangement
Lighting Image Reference for lighting setup/mood
Reference Image Special reference type that can be used for any purpose
This is a flexible reference type that works with the reference_prompt below. Can be used for additional characters, props, or any other reference that doesn't fit the standard categories.
reference_prompt Custom prompt specifically for the Reference Image
This special prompt is used exclusively with the Reference Image above. It allows you to provide specific instructions for how the reference should be used.

Additional Prompt Controls

Positive Prompt Additions: Additional positive prompt elements to include
Negative Prompt: Negative prompt elements to avoid

Batch-Specific Controls (IntelliPrompt Batch only)

Use Batch: Enable/disable batch processing
Batch File: Path to the text file containing prompts (one per line)
Batch Index: Index of the prompt to use from the batch file (0-based)

Outputs

IntelliPrompt provides several outputs that can be connected to other nodes in your workflow.

Images: A batch of images that can be sent to OpenAI GPT Image 1
Mask: Pass-through of the input mask image
Assembled Prompt: The final assembled prompt with all enhancements and references
Metadata: Structured metadata containing prompt, settings, and reference information for image saving

Metadata Structure

The metadata output is a dictionary containing comprehensive information about the prompt generation process, which can be used for:

  • Saving metadata with generated images
  • Recreating workflows later
  • Tracking prompt history
  • Analyzing prompt effectiveness

How It Works

IntelliPrompt uses a sophisticated process to analyze images and assemble comprehensive prompts.

Prompt Assembly Process

  1. Context Integration: Adds storyboard context, backstory, and shot description to the base prompt
  2. Prompt Enhancement: Uses GPT-4o to enhance the primary prompt with additional details (if enhance_primary_prompt is enabled)
  3. Image Description: Handles reference images based on the selected image_description_mode:
    • Off: Disables all image references
    • Minimal: Uses minimal, concise references (e.g., "use the character from the 1st image")
    • Basic: Uses detailed template-based descriptions without AI analysis
    • AI-Analyzed: Uses GPT-4o to analyze each image and generate detailed descriptions
  4. Reference Integration: Adds descriptions of each reference image to the prompt
  5. Priority Section: Adds guidance on how to prioritize different elements (in Basic or AI-Analyzed modes)
  6. Positive/Negative Prompts: Adds any additional positive and negative prompt elements

Image Analysis

For each reference image, IntelliPrompt:

  1. Encodes the image to base64
  2. Sends it to GPT-4o with a specialized prompt based on the image type
  3. Receives a detailed description focusing on relevant aspects
  4. Integrates the description into the assembled prompt

Exceptional Storyboard Adherence

IntelliPrompt's storyboard handling is particularly noteworthy:

Precise Spatial Analysis

When analyzing storyboard images, IntelliPrompt pays special attention to:

  • Exact character positioning and relationships
  • Spatial layout and composition elements
  • Perspective and depth cues
  • Camera angle and framing
Strict Matching Instructions

The prompt assembly process includes specific instructions for maintaining visual fidelity:

  • Explicit directions to preserve spatial relationships
  • Detailed guidance on maintaining compositional elements
  • Clear instructions to respect the original framing and perspective
  • Emphasis on recreating the exact scene blueprint
Production-Ready Results

This exceptional storyboard adherence makes IntelliPrompt particularly valuable in:

  • Professional animation pipelines
  • Film pre-visualization workflows
  • Game development asset creation
  • Any production environment where visual continuity is critical

This level of precision ensures that the final generated images maintain strict fidelity to the director's or artist's original vision, significantly reducing the need for revisions and ensuring consistency across complex projects.

UI Guide

The IntelliPrompt node interface is designed for clarity and efficiency, with controls organized in a logical flow.

UI Layout

The IntelliPrompt node UI is organized into several distinct sections:

1
Main Controls
  • Primary Prompt text area (large multiline input)
  • AI Enhancement Level dropdown
  • Enhance Primary Prompt toggle
  • Image Description Mode dropdown
  • Verbose Logging toggle
2
Context Inputs
  • Storyboard Image input
  • Backstory text area
  • Shot Description text area
3
Reference Images
  • Character, Style, Environment Image inputs
  • Pose, Prop, Camera Image inputs
  • Layout, Lighting, Reference Image inputs
  • Reference Image Instructions text area
4
Additional Prompt Controls
  • Positive Prompt Additions text area
  • Negative Prompt text area
  • Mask Image input (at the bottom of the image inputs)
5
Project Information
  • Project ID field (specially highlighted)

UI Components

Text Areas
  • Large Multiline Inputs: Primary Prompt, Backstory, and Shot Description have expanded text areas for comfortable editing
  • Standard Text Inputs: Reference Image Instructions, Positive/Negative Prompts have standard-sized text areas
Toggles

All boolean options use toggle switches rather than dropdown selectors:

  • Toggle ON: Green with a checkmark or "ON" label
  • Toggle OFF: Red with an "X" or "OFF" label
Dropdowns
  • Enhancement Level: Visual indicator of intensity (minimal to very detailed)
  • Image Description Mode: Clear indicators for each mode
Image Inputs
  • Standard ComfyUI image input slots
  • Labeled clearly with their purpose (Character, Style, etc.)
  • Mask image is positioned at the bottom for visual separation

IntelliSave UI

Image Preview Window
  • Shows a thumbnail of the image being saved
  • Updates when the Save Now button is clicked
Metadata Preview Area
  • Resizable text area showing formatted metadata
  • Organized into sections (AI Generation Info, Metadata Tree, etc.)
  • Scrollable for viewing all content
Save Now Button
  • Prominent action button at the bottom of the node
  • Allows re-saving the current image without re-running the workflow
Metadata Inclusion Controls
  • Organized section of toggle switches
  • Controls which metadata components are included in the saved image

UI Tips

  • Hover Tooltips: Hover over controls to see additional information
  • Collapsible Sections: Click section headers to collapse/expand sections
  • Resizable Text Areas: Drag the corner of text areas to resize them
  • Visual Feedback: The node provides visual feedback when processing

IntelliSave Node

The IntelliSave node is designed specifically for saving images with IntelliPrompt metadata.

Features

  • Metadata Preservation: Embeds IntelliPrompt metadata directly into PNG files
  • Project Organization: Automatically creates folder structures based on project information
  • JSON Export: Optionally saves a separate JSON file with complete metadata
  • Intelligent Naming: Uses project identifiers in filenames for better organization

Folder Structure

When organize_by_project is enabled, IntelliSave creates a folder structure based on the project information:

output_dir/
  └── project_name/
      └── ep01/
          └── seq01/
              └── intelliprompt_project_ep01_seq01_sh0001_20230615_123045.png
              └── intelliprompt_project_ep01_seq01_sh0001_20230615_123045.json (if save_json is enabled)
IntelliSave Node Click to enlarge

Advanced Features

IntelliPrompt includes several advanced features for specialized use cases.

Mask Guidance

When a mask image is provided, IntelliPrompt adds special instructions to focus attention on the masked area, which is particularly useful for:

  • Inpainting specific regions
  • Emphasizing important elements
  • Guiding the model to pay special attention to certain areas

Batch Processing

The IntelliPrompt Batch node allows you to:

  1. Create a text file with multiple prompts (one per line)
  2. Process them sequentially by changing the batch index
  3. Apply the same reference images and settings to multiple prompts

Metadata in Production

Metadata is a critical component in professional production pipelines for several reasons:

  • Asset Tracking and Management: Enables precise tracking of assets throughout the production pipeline
  • Workflow Reproducibility: Preserves exact generation parameters for future reference
  • Quality Control and Consistency: Ensures adherence to project style guides and standards
  • Production Documentation: Creates automatic documentation of creative decisions
  • Integration with Production Tools: Enables seamless handoff between different software in the pipeline

Custom Fields

The IntelliSave node provides four custom metadata fields that can be used for:

  • Artist attribution
  • License information
  • Project notes
  • Technical details
  • Client information
  • Version numbers

Custom fields are included in both the PNG metadata and the optional JSON file.

Installation

Follow these steps to install IntelliPrompt in your ComfyUI environment.

Prerequisites

  • ComfyUI installed and working
  • OpenAI API key with GPT-4o access
  • Python 3.8 or higher

Installation Steps

# Clone the repository
cd ComfyUI/custom_nodes
git clone https://github.com/huikku/IntelliPrompt.git

# Create a symbolic link (alternative to direct cloning)
# Windows
mklink /D ComfyUI\custom_nodes\IntelliPrompt C:\path\to\IntelliPrompt

# Linux/Mac
ln -s /path/to/IntelliPrompt ComfyUI/custom_nodes/IntelliPrompt

# Set up your OpenAI API key
# Create a .env file in your ComfyUI root directory with:
OPENAI_API_KEY=your_api_key_here

# Install dependencies
pip install openai requests python-dotenv pillow

# Restart ComfyUI to load the new node

Visual Workflow Examples

See how IntelliPrompt integrates with ComfyUI in these workflow examples.

Complete Workflow Overview

This image shows a complete IntelliPrompt workflow with all components connected. The workflow demonstrates how IntelliPrompt integrates with other ComfyUI nodes to create a comprehensive image generation pipeline.

Complete Workflow Overview

Input Configuration

This detailed view of the IntelliPrompt node's inputs shows:

  • Reference image inputs (Character, Style, Environment, etc.)
  • Text inputs (Main Prompt, Backstory, Shot Description)
  • Configuration options (AI Enhancement Level, Image Description Mode)
  • Project information for metadata organization
Input Configuration

Output Connections

This view highlights the IntelliPrompt node's outputs and how they connect to other nodes:

  • The Images output connected to OpenAI GPT Image 1
  • The Assembled Prompt output connected to text inputs in generation nodes
  • The Mask output for targeted editing
  • The Metadata output connected to IntelliSave for preserving all prompt information
Output Connections

Usage Tips

Get the most out of IntelliPrompt with these helpful tips and best practices.

Getting the Best Results

  • Use the Storyboard Image to provide overall narrative context for the scene
  • Add Backstory and Shot Description for more specific guidance
  • AI Enhancement Levels:
    • Use "minimal" for slight improvements
    • Use "moderate" for balanced enhancement
    • Use "detailed" for comprehensive descriptions
    • Use "very detailed" for maximum detail
  • Image Description Modes:
    • "Off" to disable all image references
    • "Minimal" for concise, minimal references
    • "Basic" for detailed template-based descriptions
    • "AI-Analyzed" for AI-generated detailed descriptions
  • Provide clear, high-quality reference images for best analysis results

Workflow Integration

  • Connect the "Assembled Prompt" output to text prompt inputs in generation nodes
  • Connect the "Mask" output to mask inputs in other nodes
  • Connect the "Images" output to OpenAI GPT Image 1 or other nodes that accept batched images
  • The "Images" output contains a batch of images ready for use with OpenAI GPT Image 1
  • Connect the "Metadata" output to the IntelliSave node for saving with metadata
×

Join the Waitlist

Be the first to get access to IntelliPrompt when it launches.

You'll be redirected to a Google Form to complete your signup.

Get in Touch

Have questions about IntelliPrompt? Let's connect.