Nodes/ComfyUI-WJNodes/Composite Coordinate
ComfyUI Node

Composite Coordinate

Position, scale, and flip a layer before it composites

By 807502278·Created 2 years ago·Updated 11 months ago· 21
Composite Coordinate
  • Options
  • Composite_Basic
x0
y0
scale1.00
Centerfalse
flip_xfalse
flip_yfalse

The placement node in WJNodes' options-chain system for its ImageCompositeMask_adv compositor (Composite_Basic covers the chaining pattern itself, if you haven't run into it yet). Where Composite_Basic sets how two layers blend, Composite_Coordinate sets where the surface layer sits relative to the background - its X/Y position, its scale, and whether it's mirrored.

The inputs and outputs that matter

  • x, y (default 0, range -16384 to 16384) - the surface layer's pixel offset on the background. Negative values are valid and expected - that's how you push a layer partially or fully off one edge.
  • scale (default 1, range 0.01–10) - a uniform scale multiplier applied to the surface. Note this is a plain multiplier here, not an aspect-aware fit-to-canvas scale - for scaling the surface to actually fit inside the background by its long or short edge, that's Composite_Scale's job, a separate node in this same family. Per this node's own description, if a Composite_AutoScale node also feeds into the chain, its scaling multiplies with this one's rather than replacing it - worth knowing if your final size looks off and you have more than one scale-related node upstream.
  • Center (BOOLEAN, default false) - whether positioning is calculated from the background's center rather than its top-left corner. Off means x/y are offsets from the top-left, the way most image coordinate systems work by default; on shifts the origin to the middle, which is often more intuitive when you're centering a layer and nudging it from there.
  • flip_x, flip_y (BOOLEAN, default false) - mirror the surface horizontally or vertically before placing it.
  • Options (optional) - the chain to extend.
  • Composite_Basic (output) - the updated chain.

Installing it

Via ComfyUI Manager: search ComfyUI-WJNodes, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-WJNodes.git
cd ComfyUI-WJNodes
pip install -r requirements.txt

Nothing extra needed for this node.

Common issues & troubleshooting

Layer lands in the wrong spot even though x/y look correct. Check Center first - a value of x=0, y=0 means something completely different depending on whether it's on or off (top-left corner versus canvas center). This is the single most common source of "my coordinates are right but the result is wrong" in this node.

Scale looks doubled or otherwise wrong. If your graph also has a Composite_AutoScale node feeding into the same chain, remember the two scale values multiply together rather than one overriding the other - set this node's scale back to 1 if you want AutoScale's value to be the only one in effect.

Flip applied but the layer also seems to have moved. Flipping happens around the surface layer's own center before positioning, not around the canvas - if your x/y were tuned for the unflipped orientation, you may need to re-adjust them slightly after turning on flip_x/flip_y, especially with Center off.

Negative x/y produces nothing visible. That's expected if you've pushed the layer fully off the canvas - negative values large enough (relative to the layer's own size) will place it entirely outside the visible frame. Not a bug, just the math doing what you asked.

CategoryWJNode/ImageBlend/options

Inputs (7)

NameTypeDefaultDescription
xINT0-16384–16384
yINT0-16384–16384
scaleFLOAT1.000.01–10
CenterBOOLEANfalse
flip_xBOOLEANfalse
flip_yBOOLEANfalse
OptionsoptComposite_Basic

Outputs (1)

NameTypeDescription
Composite_BasicComposite_Basic