Skip to content

Moved dynamic prompt processing into Python#1

Open
randomeizer wants to merge 16 commits intoissue/679-multiline-dynamicPromptsfrom
issue/679-multiline-dynamicPrompts-opt-in
Open

Moved dynamic prompt processing into Python#1
randomeizer wants to merge 16 commits intoissue/679-multiline-dynamicPromptsfrom
issue/679-multiline-dynamicPrompts-opt-in

Conversation

@randomeizer
Copy link
Copy Markdown
Owner

Previously, dynamic prompts were being processed via Javascript before getting sent to the Python node implementation.

This had two downsides:

  • All "multiline" text fields (aka <textarea> "customtext") were getting processed as "dynamic prompts", even if you didn't want it. This is limiting for other Node types that want unprocessed text.
  • The nodes had no control over how it was being processed.
  • It was super confusing for me as a developer to have some types of text being mutated out of my control.

This update creates a dynamic_prompt.py implementation that replicates the previous one, as well as adding some parsing checks to ensure it's working as expected.

It also updates any existing nodes that use dynamic prompts.

A consequence is that any custom nodes that want dynamic prompt capabilities will need to update to use the dynamic_prompts.py functions. However, it's not too onerous, so hopefully it's not that big a deal.

While it does cause some backwards-compatibility issues, I feel that it's a big enough improvement that it's worth implementing, so that more diverse custom node types can be built that have multiline text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants