> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# ImageCompositor - ComfyUI Built-in Node Documentation

> Complete documentation for the ImageCompositor node in ComfyUI. Learn its inputs, outputs, parameters and usage.

This node combines multiple image layers into a single composited image. It takes a layer stack built with the Add Layer node and optionally a saved composition from the compositor editor, then blends the layers together using their placement, size, rotation, opacity, and blend mode settings.

## Inputs

| Parameter    | Description                                                                                                                                                                                                                                                                                                                                                                                    | Data Type  | Required | Range             |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------- | ----------------- |
| `layers`     | Layer stack to composite; build it with Add Layer. Items are stacked by z\_index, batch frames inside an item expand to consecutive layers, and item placement, opacity, and blend mode define the initial composition. Without an explicit document canvas the size is a best-effort maximum extent of the placed layers. A saved composition that matches the current inputs takes priority. | LAYERS     | Yes      | Maximum 50 layers |
| `compositor` | Layered composition saved by the compositor editor.                                                                                                                                                                                                                                                                                                                                            | COMPOSITOR | No       | None              |

**Notes on constraints:**

* The layer stack supports a maximum of 50 layers (expanded frames); providing more raises an error.
* Only raster layers are currently supported; other layer item types raise an error.
* The `layers` document version must be 1; other versions raise an error.
* The saved `compositor` state is only replayed when its recorded input fingerprints match the current layer stack. If they do not match, the node falls back to composing from the layer properties and marks the saved state as stale.
* Layer opacity is clamped to the range 0.0 to 1.0.
* Layer horizontal/vertical placement (`x`, `y`) is clamped to the maximum resolution limit.
* Layer width and height fall back to the natural image size when set to zero or less, and are capped at the maximum resolution limit.
* The composited canvas size must not exceed the maximum resolution limit.

## Outputs

| Output Name | Description                                                                                                                        | Data Type |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `IMAGE`     | Composited image. Carries an alpha channel when the composite has transparent areas (e.g. hidden background), otherwise plain RGB. | IMAGE     |
| `MASK`      | Transparency of the composite (1 = fully transparent). All zeros when the composite is opaque.                                     | MASK      |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ImageCompositor/en.md)

***

**Source fingerprint (SHA-256):** `1eca5c151b3737ccf76e6fd7a83cd1458b2acc314609753d597eec711bcf4bd8`
