ComfyUI Extension: ComfyUI-PD19Anime-Nodes

Authored by PD19Anime

Created

Updated

0 stars

A powerful suite of nodes for ComfyUI to dynamically load prompts and images. This pack is especially focused on batch processing from a directory and includes two main nodes: Advanced Prompt & Image Loader (Multiple) and Advanced Prompt & Image Loader (single).

Custom Nodes (0)

    README

    ⏺ PD19Anime-Nodes

    A powerful ComfyUI custom node suite designed for loading image original prompts and enhancing efficiency. Provides intelligent image loading, prompt extraction, and saving functionality.

    This node suite was developed based on my personal usage needs. Its core function is batch loading image prompts for high-resolution upscaling of large quantities of images. More nodes may be developed in the future based on my own requirements.

    This node draws from code in the was-node-suit-comfyui and comfyui-prompt-reader-node nodes. The license includes their original MIT licenses.

    image

    🌟 Main Features

    πŸ“– Advanced Prompt & Image Loader (Single)

    Intelligently extract prompt information from single images

    • Smart Extraction: Automatically reads positive and negative prompts from PNG metadata
    • Image Output: Like the official load image node, can pass loaded images to other nodes for processing
    • Filename Output: Automatically extracts and outputs original filename prefix
    • Prompt Swap: This switch can swap the extracted positive and negative positions

    πŸ“š Advanced Prompt & Image Loader (Multiple)

    Batch image processing and prompt extraction

    • Batch Processing: Supports directory-level batch image loading
    • Multiple Modes:
      • incremental_image: Load sequentially in order (default)
      • single_image: Load by specified index
      • random: Random loading
    • Flexible Filtering: Supports glob pattern file filtering

    🎨 Advanced Empty Latent Image

    Empty latent image generator with preset dimensions

    • Common Presets:
      • Portrait (832x1216) - Vertical
      • Landscape (1216x832) - Horizontal
      • Square (1024x1024) - Square
      • Manual - Manual input
    • Smart Control: Automatically locks width/height input when preset is selected, automatically unlocks when Manual is selected
    • Batch Support: Full batch_size functionality
    • Multiple Outputs: Simultaneously outputs latent, width, height values

    πŸ’Ύ Advanced Prompt Saver

    Prompt saving and management tool

    • Auto Save: Saves positive and negative prompts as formatted txt files
    • Smart Naming: Supports custom filename prefix or automatic timestamp naming
    • Status Display: Embedded status display in node, real-time feedback on save results
    • Complete Information: Includes timestamp and original filename metadata

    πŸ”§ Installation Methods

    Method 1: ComfyUI Manager (Under review, please use git clone first)

    1. Open ComfyUI Manager
    2. Search for "PD19Anime-Nodes"
    3. Click install

    Method 2: Manual Installation

    cd ComfyUI/custom_nodes
    git clone --recursive https://github.com/PD19Anime/ComfyUI-PD19Anime-Nodes.git
    

    Restart ComfyUI after installation to use.

    πŸ“‹ Usage Examples

    image

    Advanced Prompt & Image Loader (Multiple)

    This node is the core functionality of this node suite. For usage examples, please refer to the image above.

    • It's not recommended to connect other STRING data to CLIP Text Encode (Prompt) when generating images, as this may cause prompts to be unreadable or produce other errors
    • If the prompts read from images generated by your workflow are reversed, please use the swap_prompt switch, so you don't need to reconnect nodes or modify your image generation workflow.
    • Images generated by overly complex workflows may have compatibility issues.

    image

    Advanced Prompt Saver

    This node is used to save obtained prompts to a specified location. For usage examples, please refer to the Image above.

    • You can customize the .txt file name or connect Advanced Prompt & Image Loader's filename_prefix to use the image's filename.
    • When filename_prefix is empty, it will automatically generate a filename based on the current time.

    image

    Advanced Empty Latent Image

    This node is used to replace the official Empty Latent Image node. You can use preset dimensions or manually input custom dimensions.

    • When a preset is selected, the width and height below will be locked. Selecting Manual will unlock them.

    ✨ What's New

    v1.2.2 (Latest)

    • ✨ Added Advanced Prompt Saver node
    • ✨ Added Advanced Empty Latent Image node
    • πŸ› Fixed positive/negative prompt order issue to some extent
    • ⚑ Optimized node user experience

    πŸ“„ License

    MIT License

    πŸ‘€ Author

    PD19πŸͺAnime (https://x.com/PD19_Anime)