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 4 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 NOT, AND, OR, NAND, NOR, XOR, and XNOR, all the logic functions we could ask for.

Boolean Switch

2025-06-16_18-56_1

A simple switch node, that surprisingly somehow doesn't exist as a core node. Takes any input, outputs any output, it is agnostic to input and output types and is generally simple and streamlined. I made the inputs optional for a simple reason: somebody could turn off a group or such that this node connects to, and set it to true, which enables it to still just work, and this leads right into the fourth node to be added:

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. To actually defend why this node should exist, I'll give a simple example with the Boolean Switch node:

2025-06-18_19-56

Here, we have connected the latent outputs to the switch, and connected the switch's boolean to the output exists node. Let's now see what happens when we just disable the HiresFix node here:

2025-06-18_19-57

Now, we have seamlessly got the initial KSampler to be the image used by the output image here, which also shows the overall usage for the switch node in these types of circumstances.

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.

1 participant