Logic Gate (NH) — Visual Guide
NH-Nodes for ComfyUI — jetthuang.com
Scenario 1: Process only large landscape images
AND gate — Both conditions must be True to proceed. Skip small or portrait images.
NH-Nodes
Compare
width > 1024
True
NH-Nodes
Logic Gate
a = True
op = AND
b = True
True
NH-Nodes
Gate Switch
enabled = True
PASS
Upscale Model
Executes!
IMAGE
NH-Nodes
Compare
height > 1024
True
b ↑
Scenario 2: Run when EITHER condition is met
OR gate — At least one condition True. E.g., apply face fix if face detected OR user forced it.
Face Detect
face_count > 0
False
NH-Nodes
Logic Gate
a = False
op = OR
b = True
True
NH-Nodes
If/Else
condition = True
Face Fix
Boolean Switch
force_fix = True
True
b ↑
Scenario 3: Toggle pipeline OFF with NOT
NOT gate — Invert a boolean. One switch controls enable/disable.
NH-Nodes
Boolean Switch
skip_upscale = True
True
NH-Nodes
Logic Gate
a = True
op = NOT
False
NH-Nodes
Gate Switch
enabled = False
BLOCKED
Truth Table
| a | b | AND | OR | NOT a | XOR | NAND | NOR |
| F | F |
F | F | T |
F | T | T |
| F | T |
F | T | T |
T | T | F |
| T | F |
F | T | F |
T | T | F |
| T | T |
T | T | F |
F | F | F |
Quick Patterns
NH-Nodes — jetthuang.com —
GitHub