Nodes/ComfyUI-enricos-nodes/πŸ’œ Compositor Transforms Output (V3)
ComfyUI Node

πŸ’œ Compositor Transforms Output (V3)

Turn a canvas layout into numbers other nodes can eat

By erosDiffusionΒ·Created 2 years agoΒ·Updated about a month agoΒ· 634
πŸ’œ Compositor Transforms Output (V3)
    • x
    • y
    • width
    • height
    • angle
    • bbox x
    • bbox y
    • bbox width
    • bbox height
    β—„transformsβ€”β–Ί
    β—„channel1β–Ί
    β—„forceInttrueβ–Ί

    The Compositor remembers where you dragged things, but that knowledge lives in a JSON string - the transforms output on Compositor3. This node is the translator: it reads that JSON and spits out plain integers that ordinary nodes understand. The pitch in the README is regional prompting: drag an image exactly where you want it on the canvas, then feed its x/y/width/height straight into a Set Area Conditioning node or a crop/paste coordinate input, and your generation region lines up with your visual layout.

    Wire the Compositor's transforms output into the transforms input here. That's the whole connection.

    Inputs

    • transforms - the JSON string from the Compositor. Note it's forceInput, so you must wire it; you can't type a value in.
    • channel - which of the 8 layers to read (1–8, default 1). Remember image1 is the background-most layer.
    • forceInt - when on (default), everything comes out as integers. That's what Set Area Conditioning wants. Flip it off if you need the raw float precision.

    Outputs

    Nine of them, all per the selected channel: x, y, width, height, angle, plus the bounding box variants bbox x, bbox y, bbox width, bbox height. The x/y are the layer's top-left after padding is subtracted (the canvas coordinates are padding-based, so this node removes it for you), width/height are the scaled dimensions, and the bbox set is the layer's un-rotated bounding box - useful when the object is rotated and you need the axis-aligned footprint. All of them wire into INT inputs downstream.

    Installing

    Pack install as usual - no models, no extra dependencies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/erosDiffusion/ComfyUI-enricos-nodes.git
    

    or ComfyUI Manager β†’ "Compositor" β†’ erosDiffusion, then restart.

    Gotchas

    • The angle here is the rotation from the canvas state; if you rotate a layer and then feed its x/y into something, use the bbox pair if the unrotated footprint is what the downstream node expects.
    • The transforms JSON is only updated when the canvas saves (on mouse-out), so the numbers you get are from the last saved state. If you drag something and the outputs look stale, mouse out of the canvas to save first.
    • This is the V3 node; the V4-era equivalent (Compositor4TransformsOut) exists and reads the same JSON structure, but V4 currently hands you the state via fabricData_output instead of a transforms socket - same data, different port.
    Categoryimage

    Inputs (3)

    NameTypeDefaultDescription
    transformsSTRINGβ€”
    channelINT11–8β€”
    forceIntBOOLEANtrueβ€”

    Outputs (9)

    NameTypeDescription
    xINTβ€”
    yINTβ€”
    widthINTβ€”
    heightINTβ€”
    angleINTβ€”
    bbox xINTβ€”
    bbox yINTβ€”
    bbox widthINTβ€”
    bbox heightINTβ€”