ComfyUI > Nodes > ComfyUI Easy Use > PromptReplace

ComfyUI Node: PromptReplace

Class Name

easy promptReplace

Category
EasyUse/Prompt
Author
yolain (Account age: 1341days)
Extension
ComfyUI Easy Use
Latest Updated
2024-06-25
Github Stars
0.51K

How to Install ComfyUI Easy Use

Install this extension via the ComfyUI Manager by searching for ComfyUI Easy Use
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Easy Use 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

PromptReplace Description

Streamline text prompt modifications by replacing specific substrings, enhancing workflow efficiency for AI artists.

PromptReplace:

The easy promptReplace node is designed to streamline the process of modifying text prompts by allowing you to replace specific substrings within a given prompt. This node is particularly useful for AI artists who need to make quick and efficient adjustments to their text prompts without manually editing each instance. By specifying up to three pairs of substrings to find and replace, you can easily customize and refine your prompts to better suit your creative needs. This node simplifies the text editing process, making it more intuitive and less time-consuming, ultimately enhancing your workflow and productivity.

PromptReplace Input Parameters:

prompt

This is the main text input where you provide the initial prompt that you want to modify. The prompt can be multiline, allowing for more complex and detailed text inputs. This parameter is required and must be provided for the node to function. The default value is an empty string.

find1

This parameter specifies the first substring that you want to find within the prompt. It is optional and can be left empty if not needed. The default value is an empty string.

replace1

This parameter specifies the substring that will replace the first substring found within the prompt. It is optional and can be left empty if not needed. The default value is an empty string.

find2

This parameter specifies the second substring that you want to find within the prompt. It is optional and can be left empty if not needed. The default value is an empty string.

replace2

This parameter specifies the substring that will replace the second substring found within the prompt. It is optional and can be left empty if not needed. The default value is an empty string.

find3

This parameter specifies the third substring that you want to find within the prompt. It is optional and can be left empty if not needed. The default value is an empty string.

replace3

This parameter specifies the substring that will replace the third substring found within the prompt. It is optional and can be left empty if not needed. The default value is an empty string.

PromptReplace Output Parameters:

prompt

The output is the modified prompt after all specified find-and-replace operations have been performed. This output is a single string that reflects the changes made based on the input parameters. It allows you to see the final version of your prompt with all the specified replacements applied.

PromptReplace Usage Tips:

  • To make multiple replacements in a single prompt, ensure you specify the correct substrings in the find and replace parameters.
  • If you only need to replace one substring, you can leave the other find and replace parameters empty.
  • Use this node to quickly adapt and refine your prompts for different creative scenarios without manually editing the text.

PromptReplace Common Errors and Solutions:

"prompt parameter is required"

  • Explanation: This error occurs when the prompt parameter is not provided.
  • Solution: Ensure that you input a valid prompt string in the prompt parameter.

"Replacement parameters not working as expected"

  • Explanation: This error may occur if the find and replace parameters are not correctly specified.
  • Solution: Double-check the substrings in the find and replace parameters to ensure they match the text you want to modify in the prompt.

PromptReplace Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Easy Use
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.