Skip to content

[enhancement]: Prompt Template workflow node #8664

@brpeterman

Description

@brpeterman

Is there an existing issue for this?

  • I have searched the existing issues

Contact Details

No response

What should this feature add?

Prompt Templates are data structures that store a positive prompt, a negative prompt, and placeholders for additional prompts in each. They're very useful in Generate mode, but not accessible in Workflow mode.

A new node type that exposes Prompt Templates would be useful.

Inputs:

  • Positive Prompt (StringField)
  • Negative Prompt (StringField)

Outputs:

  • Positive Prompt (StringField)
  • Negative Prompt (StringField)

Behavior:

  • Replaces the {prompt} in the template prompts with their corresponding inputs.

Additional requirements:

  • We'd also need a selection input that lists Prompt Templates so the user can select which one they want to use.

Example using the Line Art template:

  1. Line Art has the following prompts:
    • Positive: {prompt} Line art. bold outline. simplistic. white background. 2d
    • Negative: {prompt} photo. digital art. greyscale. solid black. painting
  2. I place a Prompt Template node in my workflow.
  3. I select the Line Art template.
  4. I create a StringField primitive for the positive prompt and set its value to car.
  5. I link the positive prompt primitive to the Positive Prompt input of the prompt template node.
  6. I create a StringField primitive for the negative prompt and set its value to person.
  7. I link the negative prompt primitive to the Negative Prompt input of the prompt template node.
  8. I expect the following outputs:
    • Positive prompt: car Line art. bold outline. simplistic. white background. 2d
    • Negative prompt: person photo. digital art. greyscale. solid black. painting

Alternatives

Currently I work around this by just copying my positive and negative prompts from a prompt template into StringFields. It works fine, but requires a lot of clicks and copying.

Additional Content

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions