Skip to content

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

LaVie024
Copy link
Contributor

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.
2025-05-31_17-36

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.
2025-05-31_17-44

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.

@webfiltered
Copy link
Collaborator

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.

@LaVie024
Copy link
Contributor Author

LaVie024 commented Jun 1, 2025

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.

* Related: [Add nodes for basic logic and math operation #8024 (comment)](https://github.com/comfyanonymous/ComfyUI/pull/8024#issuecomment-2892551496)

* Previous PR: [Add Convert Data Type Node #8205](https://github.com/comfyanonymous/ComfyUI/pull/8205)

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.

@jtydhr88
Copy link
Contributor

jtydhr88 commented Jun 1, 2025

@webfiltered looks like this PR is not related to the two you mentioned, this is something that improved string node

@webfiltered
Copy link
Collaborator

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.

@LaVie024 LaVie024 requested a review from comfyanonymous as a code owner June 18, 2025 22:34
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.

3 participants