ComfyUI Node: Prompt Template Loader

Class Name

PromptTemplateLoader

Category
Shrug Nodes/Logic
Author
fblissjr (Account age: 4014days)
Extension
Shrug-Prompter: Unified VLM Integration for ComfyUI
Latest Updated
2025-09-30
Github Stars
0.02K

How to Install Shrug-Prompter: Unified VLM Integration for ComfyUI

Install this extension via the ComfyUI Manager by searching for Shrug-Prompter: Unified VLM Integration for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Shrug-Prompter: Unified VLM Integration for ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Prompt Template Loader Description

Streamlines loading and managing AI prompt templates by extracting YAML metadata from files.

Prompt Template Loader:

The PromptTemplateLoader is a specialized node designed to streamline the process of loading and managing prompt templates for AI applications. Its primary function is to read prompt templates from files, which can be organized in various subdirectories, and extract any YAML metadata headers embedded within these templates. This capability allows you to maintain a structured and organized approach to managing prompt templates, making it easier to customize and adapt prompts for different AI tasks. By automatically handling the extraction of metadata and the content of the templates, the PromptTemplateLoader simplifies the workflow, enabling you to focus on the creative aspects of AI prompt design without worrying about the underlying file management and parsing complexities.

Prompt Template Loader Input Parameters:

template_name

The template_name parameter specifies the name of the template file you wish to load. This parameter is crucial as it directs the node to the specific template file within the designated templates directory. The available options for this parameter are dynamically generated based on the files present in the templates directory, ensuring that you can only select from existing templates. This approach minimizes errors related to incorrect file names and enhances the user experience by providing a straightforward selection process.

Prompt Template Loader Output Parameters:

prompt_text

The prompt_text output parameter provides the main content of the loaded template. This is the actual text that will be used as a prompt in your AI application. It is extracted from the template file, excluding any YAML metadata headers, ensuring that you receive a clean and ready-to-use prompt.

metadata

The metadata output parameter contains additional information extracted from the YAML metadata header of the template file, if present. This metadata is returned as a JSON string and can include various attributes that describe the template, such as its intended use or specific configuration settings. This information can be valuable for dynamically adjusting the behavior of your AI application based on the template's characteristics.

Prompt Template Loader Usage Tips:

  • Organize your template files in the designated templates directory and use subdirectories to categorize them for easier management and retrieval.
  • Ensure that your template files have a YAML metadata header if you want to include additional configuration information, as this can enhance the flexibility and adaptability of your prompts.

Prompt Template Loader Common Errors and Solutions:

ERROR loading <template_name>: <error_message>

  • Explanation: This error occurs when the node encounters an issue while attempting to load the specified template file. The <error_message> provides additional details about the nature of the problem, such as file not found or permission issues.
  • Solution: Verify that the template file exists in the templates directory and that the file name is correctly specified. Ensure that the file has the appropriate read permissions and that the directory structure is correctly set up. If the error persists, check the file for any formatting issues that might prevent it from being read correctly.

Prompt Template Loader Related Nodes

Go back to the extension to check out more related nodes.
Shrug-Prompter: Unified VLM Integration for ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Prompt Template Loader