-
Notifications
You must be signed in to change notification settings - Fork 9k
Improve logic for concatenate node + add wildcard node #8364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Can you please update your PRs with new commits, rather than closing and opening new ones? The reason is simply that diffing PRs and a split conversation history becomes much more time-consuming.
|
I had no reason to continue working on a convert data type node; basically #8205 was about the best it could be and it was obvious it wasn't going to be merged, to me it's just whatever, I have a different idea for an implementation for that that's a bit more involved, in the meantime however I'll focus on other things. |
@webfiltered looks like this PR is not related to the two you mentioned, this is something that improved string node |
Yup was just skimming through - appears I may have made a mistake; if so, my apologies! Will circle back in the event that it isn't reviewed by another first. |
One thing I severely overlooked with implementing the current logic for the delimiter is that it still applies if either string_a or string_b are null. This logic effectively fixes that, and also enables great flexibility.

Secondly, I would like to introduce the Wildcard node, also to be added as a string node. It is not really based on any current custom node implementations for Comfy, rather it is meant to be much simpler in practice. The rudimentary idea of it is simple: take a string, turn it into a list based on a given separator (by default we just use newline), and randomly select an index.

This of course, is not meant to be the "best" implementation but it is a very simple implementation, and just gives a straight string output, making it useful for prompts and such. Could possibly be made more useful if a Load String node were to exist or if a Load String node from a custom node suite is used as the text input for the Wildcard node.