Nodes/ComfyUI-ProtoTeller/Conditional Image Rotate
ComfyUI Node

Conditional Image Rotate

The 'rotate' that's really a flip — and why reversed cards want it

By DoctorDiffusion·Created 5 months ago·Updated 5 months ago· 1
Conditional Image Rotate
  • image
  • IMAGE
number0

First, the name

Conditional Image Rotate doesn't rotate anything. Open the source and there's exactly one line of substance: np.flipud() - a vertical flip - applied when the number input is even. Odd numbers pass the image through untouched. Call it a 180° spin and you'd be wrong for asymmetric art; call it "turn upside down" and you're exactly right, which for this pack is the whole point.

Why this exists

A tarot card can be drawn upright or reversed - upside-down - and the reversal changes the meaning. In the ProtoTeller workflow, a draw's integer value decides parity, and that same number routes the reading text through the pack's conditional text nodes and decides whether the card art gets flipped here. Even = reversed = flipped vertically, so the reader sees the card the way it was allegedly dealt.

Inputs and output

  • image - your card IMAGE.
  • number - INT, 0–100. Even flips, odd passes through.

Output: one IMAGE, flipped or not. There's no rotation angle, no direction toggle, no flip-horizontal option - it's a single parity check.

Wiring it

Feed it the same number you feed ConditionalTextSwitch and ConditionalTextConcat, so the flip, the reading text, and the concat all agree on whether the card is reversed. Wire the IMAGE out into CardTitles (to draw the title upside-down for the reversed card - the rotation there, not here) or into PreviewTextImage.

Honest limitations

It's a vertical mirror, not a rotation. If your card art happens to be vertically symmetric, a flip looks identical to a 180° turn, which is why the naming barely gets challenged. And it handles one image at a time - it squeezes the batch dimension down, flips, and re-expands - so don't feed it a whole batch of cards expecting each to flip independently.

Install

Nothing special: Manager → search "ProtoTeller", or

cd ComfyUI/custom_nodes
git clone https://github.com/DoctorDiffusion/ComfyUI-ProtoTeller

then restart. No models, no dependencies - this node is a few lines of numpy and works completely standalone, before you've downloaded a single tarot model.

CategoryProtoTeller

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
numberINT00–100

Outputs (1)

NameTypeDescription
IMAGEIMAGE