ComfyUI > Nodes > DJZ-Nodes > Prompt Inject

ComfyUI Node: Prompt Inject

Class Name

PromptInject

Category
Custom-Nodes
Author
DriftJohnson (Account age: 4052days)
Extension
DJZ-Nodes
Latest Updated
2025-04-25
Github Stars
0.04K

How to Install DJZ-Nodes

Install this extension via the ComfyUI Manager by searching for DJZ-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter DJZ-Nodes 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 Inject Description

Enhance text prompts by injecting phrases dynamically for AI artists seeking richer narratives.

Prompt Inject:

The PromptInject node is designed to enhance your creative text prompts by seamlessly inserting additional phrases or sentences into existing text. This node is particularly useful for AI artists who want to enrich their narrative or descriptive prompts with extra details or dramatic elements. By allowing you to specify a target phrase within your text, the node can inject new content either before or after this target, depending on your needs. This capability enables you to dynamically modify and enhance your text prompts, making them more vivid and engaging. The PromptInject node is a powerful tool for those looking to add depth and complexity to their AI-generated art narratives.

Prompt Inject Input Parameters:

text

This parameter represents the original text where you want to inject additional content. It is a multiline string, allowing you to work with longer passages or complex narratives. The text serves as the canvas for your creative modifications, and the node will search within this text to find the specified target phrase for injection.

target

The target parameter is a single-line string that specifies the exact phrase within your text where you want the injection to occur. By default, it is set to "the scene is captured." This parameter is crucial as it determines the location within the text where the new content will be inserted. The node will look for this phrase and perform the injection operation around it.

injection

This parameter is a single-line string that contains the content you wish to add to your text. By default, it is set to "Screeching tires." The injection parameter allows you to introduce new elements or details into your narrative, enhancing the overall richness and impact of your text. The node will wrap this content with spaces to ensure it integrates smoothly into the existing text.

Prompt Inject Output Parameters:

STRING

The output of the PromptInject node is a modified version of the original text, returned as a single string. This output reflects the changes made by the injection process, with the new content seamlessly integrated into the specified location within the text. The result is a more detailed and engaging narrative that incorporates the additional elements you specified.

Prompt Inject Usage Tips:

  • To achieve the best results, carefully choose the target phrase in your text where the injection will occur. This ensures that the new content is contextually relevant and enhances the narrative effectively.
  • Experiment with different injection phrases to see how they alter the tone and detail of your text. This can help you find the perfect balance between the original content and the new additions.

Prompt Inject Common Errors and Solutions:

Cannot execute because a node is missing the class_type property.

  • Explanation: This error occurs when the node is not properly configured with the necessary class type information, which is required for execution.
  • Solution: Ensure that the node is correctly set up with the appropriate class type mappings. Check the configuration files to verify that the PromptInject class is properly registered.

Cannot execute because node Prompt Inject does not exist.

  • Explanation: This error indicates that the PromptInject node is not recognized in the current setup, possibly due to a missing or incorrect class mapping.
  • Solution: Verify that the PromptInject node is correctly defined in the NODE_CLASS_MAPPINGS and that the class is available in the system. Ensure that the node files are correctly placed and accessible.

Prompt Inject Related Nodes

Go back to the extension to check out more related nodes.
DJZ-Nodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.