DP Place Image
Pin an image at an exact x/y on a fixed canvas
- image
- mask
- IMAGE
Resize-and-composite nodes are everywhere in ComfyUI, but most of them either center your image on the canvas or make you do the math yourself for anything else. DP Place Image skips the math: you give it a canvas size and an exact x/y, and it puts your image there. That's the whole job, and it's the right tool whenever "centered" isn't what you want - logo placement, product shots on a fixed background, building a composite where three or four elements each need their own precise spot.
How it works
You define the output canvas with width and height, then tell the node where your image lands on it with x_position and y_position. Positive coordinates place the image further right/down from the canvas origin; because the position range extends into negative territory (down to -8192), you can also push part of the image off-canvas on purpose - useful for a deliberate crop, or for lining up a partial overlay at the edge of frame. An optional mask lets you control which parts of the placed image actually composite in, so you're not limited to a hard rectangular paste - cut a shape out of the source image first and only that shape lands on the canvas.
This is a plain compositing operation, not a blend-mode engine - don't expect multiply/screen/overlay math here. It answers "where does this go," not "how does it blend."
Inputs and outputs
Required:
image- what you're placing.width/height(default 1024, 64-8192, step 8) - the output canvas size.x_position/y_position(default 0, -8192 to 8192) - where the image's origin lands on that canvas.
Optional:
mask- restricts compositing to the masked region of the source image instead of the full rectangle.
One output: IMAGE, the finished canvas with your image placed on it - feed it straight into a save node, another composite pass, or back into img2img.
Installing it
ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes
Restart ComfyUI. No models to download - this is pure image-array math, so it's ready the moment it imports. It shows up under the DP category as DP Place Image.
Where people get tripped up
The step size on width/height (8px increments) is worth knowing before you fight it - if you're trying to match a canvas to an odd resolution and the value won't land exactly, that's the step, not a bug. Widen or narrow by 8s.
The other thing that catches people: x_position/y_position place the image's origin corner, not its center. If you're used to compositing tools that center by default, the first placement will look "wrong" until you account for the image's own width/height when picking coordinates - to center a 512px-wide image on a 1024px canvas, x_position needs to be 256, not 0.
And because there's no blend mode, a placed image with hard edges and no mask will look pasted rather than blended - if you want a soft edge, cut a feathered mask for the source image before it reaches this node (DP Mask Settings, elsewhere in this same pack, does exactly that grow/feather step) rather than expecting this node to soften it for you.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 102464–8192 | — |
| height | INT | 102464–8192 | — |
| x_position | INT | 0-8192–8192 | — |
| y_position | INT | 0-8192–8192 | — |
| maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |