ComfyUI Node

Mirror transform

Flip and rotate the latent while it denoises

By kuschanow·Created 3 years ago·Updated 18 days ago· 23
Mirror transform
  • offset_optional
  • TRANSFORM
start_at0.00
stop_at0.00
mode
directionhorizontally

Mirror transform flips the latent during sampling - and it does more than its name suggests, because it also does rotations. It's a transform node, so it emits a TRANSFORM object rather than an image; a TSampler, TSampler Advanced, or a Transform Hijack-patched sampler executes it step by step on the denoised prediction.

The inputs

  • direction - the interesting one. Five choices: vertically, horizontally, both, 90 degree rotation, and 180 degree rotation. The last two are a bonus the standalone Latent mirror node doesn't offer (that one only flips).
  • start_at / stop_at - the step window as fractions of total steps.
  • mode - replace flips outright; combine averages the flipped and original latent, which inverts the geometry's effect into a blended, ghosted symmetry.
  • offset_optional - an OFFSET to fire on every Nth step instead of continuously.

Why you'd use it

Mirroring the latent mid-sampling is the classic trick for getting clean symmetric composition without a visible center seam. Do it during the early structure steps - say start_at: 0, stop_at: 0.2 - and the model rebuilds both halves as it refines, so you end up with a mirrored image that looks intentional rather than a hard-flip job.

The rotation directions are the sleeper feature. A 180-degree rotation mid-sampling with combine mode creates a four-way-ish symmetry smear that's genuinely hard to reproduce any other way, and 90-degree rotations pair well with a shift to fake rotational symmetry in tiles. This is the node people pull out for logo-ish, heraldic, kaleidoscopic compositions.

The catches

  • Same pack-wide default trap: start_at: 0, stop_at: 0 means the transform never fires. Raise stop_at.
  • combine + mirror makes everything softer and ghosted; replace + a full-window mirror gives hard symmetry. They read very differently - try both.
  • Mirroring late in the run mirrors detail, which is usually the least useful time to do it. Early steps are where symmetry buys you something.

Install

Standard for this pack:

cd ComfyUI/custom_nodes
git clone https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control

Restart after cloning, or install "Advanced Latent Control" via ComfyUI Manager. No model downloads, no pip extras.

When not to use it

If you only ever want to flip a finished image, don't use this node - the pack's plain Latent mirror node (or a stock image flip) is simpler and cheaper. Mirror transform earns its keep only when the mirroring needs to happen during denoising, so the model can compensate and rebuild around the symmetry. That's the whole point of the transform system, and this node is one of its best demonstrations. Start with a horizontal mirror, start_at: 0, stop_at: 0.2, replace mode, and watch what happens to the composition.

Categorysampling/transforms

Inputs (5)

NameTypeDefaultDescription
start_atFLOAT0.000–1
stop_atFLOAT0.000–1
modeCOMBO2 options: replace, combine
directionCOMBOhorizontally5 options: vertically, horizontally, both, 90 degree rotation, 180 degree rotation
offset_optionaloptOFFSET

Outputs (1)

NameTypeDescription
TRANSFORMTRANSFORM