Moved dynamic prompt processing into Python#1
Open
randomeizer wants to merge 16 commits intoissue/679-multiline-dynamicPromptsfrom
Open
Moved dynamic prompt processing into Python#1randomeizer wants to merge 16 commits intoissue/679-multiline-dynamicPromptsfrom
randomeizer wants to merge 16 commits intoissue/679-multiline-dynamicPromptsfrom
Conversation
- Removed `dynamicPrompts.js` - Added `comfy/dynamic_prompts.py` - Added calls to parse/check dynamic prompts from relevant Nodes.
- Commented out VALIDATE_INPUTS for nodes using dynamic prompts, since I can't get it to run without crashing the run.
…ne-dynamicPrompts-opt-in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, dynamic prompts were being processed via Javascript before getting sent to the Python node implementation.
This had two downsides:
This update creates a
dynamic_prompt.pyimplementation 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.pyfunctions. 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.