Composite Canvas adv
Set what's behind everything before you composite
- Options
- image
- Composite_Basic
One of ten option nodes in WJNodes' settings-chain system for its ImageCompositeMask_adv compositor - see Composite_Basic for the full explanation of how the chain works if this is the first one you've landed on. Composite_Canvas_adv sets what the base canvas actually is: a flat color, or a full image.
How it works
By default, this configures a solid-color canvas - the flat backdrop your surface layer gets composited onto when you're not compositing onto an existing photo at all (think: placing a cut-out subject onto a plain background color). color takes a hex string like the one any color picker would give you.
The image input changes that: connect an image here, and per the node's own description, the canvas uses that image instead of a flat color. That's the more common real-world case - compositing onto an actual background photo rather than a solid fill - so if you're doing a normal "put this on top of that" composite, you'll usually want image connected and can mostly ignore color.
The inputs and outputs that matter
color(default#ffffff, STRING) - hex color for a flat canvas. Only matters whenimageisn't connected.image(optional, IMAGE) - a real image to use as the canvas background instead of a flat color.Options(optional) - the chain to extend.Composite_Basic(output) - the updated chain, ready for the next option node or the compositor itself.
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 specifically.
Common issues & troubleshooting
Canvas stays white no matter what color you set. Confirm you actually wired this node's Composite_Basic output into the chain that reaches the compositor - like every option node in this family, Composite_Canvas_adv doesn't do anything on its own; it only configures a setting that another node reads.
Set a color but the background shows an image instead, or vice versa. Check the image input specifically - it's optional, so it's easy to forget it's connected (or forget it isn't) from an earlier version of the graph. The node's own logic prefers the image when one is present and only falls back to the flat color when it isn't.
Hex color doesn't come out looking right. Standard 6-digit hex (#rrggbb) is the safe format to use - if you're generating this string programmatically from another node, make sure it includes the leading # and full six digits rather than a shorthand 3-digit form, since the node's own description doesn't state that shorthand is supported.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| color | STRING | #ffffff | — |
| Optionsopt | Composite_Basic | — | |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Composite_Basic | Composite_Basic | — |