Modulation Direction
The tiny preset that steers the effect
- direction
Modulation Direction is a one-trick node, and the trick is honest: it outputs a preset value. You pick a direction from a dropdown - up_to_down, down_to_up, left_to_right, or right_to_left - and it hands that choice to FairLab's Modulation node on a dedicated wire type. That's the entire job, and it exists because the modulation effect's scan direction matters and should be a visible, reusable knob rather than a buried widget.
The output type is its own thing (ModulationDirection), so it only plugs into the Modulation node's direction socket - the type system keeps you from wiring a random string into the wrong place. If you're building a batch of modulation variations (one per direction, say, to preview scanline effects), a single Direction node per variant makes each branch self-documenting.
Inputs and outputs
direction(dropdown) - one of the four scan directions, defaultup_to_down.direction(ModulationDirection) out - the chosen value, wired into Modulation.
How it works
It's a value node with a whitelisted enum: it returns whatever you selected. No processing, no math. The value is just a token that Modulation reads to decide which axis - and which direction along it - the error diffusion scans.
Where it fits
Strictly as the companion to Modulation. If you're not using Modulation, you don't need this. If you are, it's the clean way to make direction an explicit graph input instead of a default you have to remember to change inside the effect node.
Install
FairLab installs as one pack via ComfyUI Manager (search ComfyUI-FairLab) or:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
cd ComfyUI-FairLab
pip install -r requirements.txt
Restart, then find it under Fair/image. No extra dependencies.
Gotchas
- The custom output type means it only connects to
Modulation's direction socket - which is a feature (it can't be miswired), but also means you can't feed its output to anything else or reuse it as a generic string. - If you're doing a one-off modulation and don't care about reusing the direction, you can skip this node entirely and just set Modulation's own dropdown. This node pays off when the direction is a repeated, shared choice in a bigger graph.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| direction | COMBO | up_to_down | 4 options: up_to_down, down_to_up, left_to_right, right_to_left |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| direction | ModulationDirection | — |