Skip to content

Add logic operation nodes #8581

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 6 commits into
base: master
Choose a base branch
from

Conversation

LaVie024
Copy link
Contributor

@LaVie024 LaVie024 commented Jun 18, 2025

This is a continuation of a now dormant PR draft, #8024. This is intended to be a more streamlined and simplified version, and currently I am only focused on adding three logic nodes involving booleans for the moment.

Boolean Logic Gate

2025-06-20_14-27

In the original PR, these were all a bunch of nodes that were simply cumbersome to go through. This node effectively combines it into one node right here. We can select AND, OR, NAND, NOR, XOR, and XNOR, all the logic functions we could ask for.

(screenshot is currently inaccurate, NOT was added but then removed, it's behavior here at least can be replicated with NAND, will have to wait for V3 schema to be able to add it back)

Compare Values

Screenshot_20250625_005431

Compares values of any types together. Completely agnostic to the input type, just tests based on the conditions the user gives. With strings, it will attempt to convert them to floats if one of the other values is a number.

Output Exists

2025-06-16_18-56_2

And here is the most dead-simple, yet a node I would argue is quite helpful, the Output Exists node. Does an output from a node exist? Then it's true. If it doesn't? Then it's false, simple as that.

LaVie024 added 3 commits June 18, 2025 23:03

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
LaVie024 added 3 commits June 20, 2025 18:28
@LaVie024
Copy link
Contributor Author

@webfiltered @Kosinkadink @christian-byrne @robinjhuang I believe it is all set to be reviewed now after talking with Guill a bit on Discord about this PR. Does not use a switch node of any type output anymore, basically everything should be fine enough to Comfy standards for this to be pulled in for it to be a basis for a larger logic node PR for the V3 schema. Let me know if there are any correction(s) I should make before this is accepted.

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.

None yet

1 participant