Nodes/ComfyUI-enricos-nodes/πŸ’œ Compositor Transforms Output V4
ComfyUI Node

πŸ’œ Compositor Transforms Output V4

Same numbers, new V4 feed

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

    Compositor4TransformsOut is the V4 edition of the transforms decoder: it reads the compositor's layout JSON and emits x, y, width, height, angle, and the bbox set (bbox x, bbox y, bbox width, bbox height) for one layer as plain integers - the thing you feed into Set Area Conditioning, crop coordinates, or any node that wants a number instead of a drag gesture.

    The one wrinkle is in the wiring. V3 exposed a dedicated transforms output on the Compositor; the V4 rewrite temporarily dropped that socket. What V4 does emit is fabricData_output - a STRING holding the canvas state JSON, which contains the same transforms and bboxes arrays in the same structure. So you wire Compositor4's fabricData_output into this node's transforms input. Same data, different door. If you're on V3, the V3 variant is the cleaner match.

    Inputs

    • transforms - the layout JSON (forceInput, so always wired). From Compositor4, feed it fabricData_output.
    • channel - which layer to read, 1–8 (default 1). image1 is the background-most.
    • forceInt - default on, returns everything as integers for conditioning nodes. Off gives you raw float precision.

    Outputs

    x, y (top-left, padding subtracted), width, height (scaled size), angle (rotation), and the axis-aligned bbox x/y/width/height for when the layer is rotated and you need its unrotated footprint. All INT.

    Installing

    Same pack, no models, no extra pip packages:

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

    or ComfyUI Manager β†’ "Compositor" β†’ erosDiffusion. Restart to load.

    Gotchas

    • Numbers come from the last saved canvas state - drag something and the outputs won't move until the canvas saves (mouse out of the export area).
    • Since V4 is still alpha, treat the "feed fabricData_output into transforms" wiring as the current workaround, not the permanent contract. When the author re-enables a dedicated transforms output on Compositor4, that's the cleaner port.
    • angle is the rotation value; if a downstream node cares about the unrotated footprint, grab the bbox pair instead of width/height.
    Categoryimage

    Inputs (3)

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

    Outputs (9)

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