ComfyUI > Nodes > ComfyUI_pytorch360convert > Paste Image with Coords

ComfyUI Node: Paste Image with Coords

Class Name

Paste Image with Coords

Category
pytorch360convert/miscellaneous
Author
ProGamerGov (Account age: 4100days)
Extension
ComfyUI_pytorch360convert
Latest Updated
2025-09-22
Github Stars
0.03K

How to Install ComfyUI_pytorch360convert

Install this extension via the ComfyUI Manager by searching for ComfyUI_pytorch360convert
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_pytorch360convert in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Paste Image with Coords Description

Integrates cropped image sections back into original images using precise coordinates.

Paste Image with Coords:

The Paste Image with Coords node is designed to seamlessly integrate a cropped section back into its original image context. This node is particularly useful when you need to manipulate specific parts of an image and then restore them to their original position without losing the overall image integrity. By using this node, you can efficiently manage image editing tasks that require precise placement of modified sections, ensuring that the final output maintains a coherent visual appearance. The node operates by taking a full image and a cropped image, along with specific coordinates, to accurately place the cropped section back into the full image. This functionality is essential for tasks that involve detailed image editing, such as patching, retouching, or any scenario where parts of an image are processed separately and need to be reintegrated.

Paste Image with Coords Input Parameters:

full_image

The full_image parameter represents the original image into which the cropped section will be pasted. It is crucial for this image to have four dimensions, typically representing batch size, height, width, and channels, to ensure compatibility with the node's operations. This parameter serves as the canvas for reintegrating the cropped section, and its dimensions must match the expected format to avoid errors during processing. There are no specific minimum or maximum values, but the default is None, indicating that a valid image tensor must be provided.

cropped_image

The cropped_image parameter is the section of the image that has been modified or processed separately and needs to be pasted back into the original image. Like the full_image, this parameter must also have four dimensions to ensure proper alignment and integration. The cropped image should fit within the specified coordinates on the full image to avoid dimension mismatches. The default value is None, meaning you must provide a valid image tensor for this parameter.

coords

The coords parameter is a list of four integers that specify the exact location on the full image where the cropped image should be pasted. These integers represent the starting and ending positions for both height and width (i.e., start_h, end_h, start_w, end_w). This parameter is critical for ensuring that the cropped image is placed accurately within the full image, maintaining the intended visual composition. The list must contain exactly four integers, and the default value is None, requiring you to provide valid coordinates for successful execution.

Paste Image with Coords Output Parameters:

Pasted Image

The Pasted Image output is the result of reintegrating the cropped section back into the full image. This output maintains the original dimensions of the full_image parameter, with the specified section replaced by the cropped_image. The importance of this output lies in its ability to provide a seamless and coherent image that incorporates the modifications made to the cropped section, ensuring that the final image appears natural and unaltered except for the intended changes.

Paste Image with Coords Usage Tips:

  • Ensure that both full_image and cropped_image have the same number of dimensions and compatible sizes to avoid errors during the pasting process.
  • Double-check the coords parameter to ensure that the specified coordinates accurately reflect the intended placement of the cropped image within the full image.
  • Use this node in conjunction with image cropping nodes to efficiently manage workflows that involve modifying specific image sections and reintegrating them.

Paste Image with Coords Common Errors and Solutions:

AssertionError: full_image should have 4 dimensions, got <actual_dim>

  • Explanation: This error occurs when the full_image does not have the required four dimensions.
  • Solution: Verify that the full_image is a tensor with four dimensions, typically representing batch size, height, width, and channels.

AssertionError: cropped_image should have 4 dimensions, got <actual_dim>

  • Explanation: This error indicates that the cropped_image does not meet the four-dimensional requirement.
  • Solution: Ensure that the cropped_image is formatted as a four-dimensional tensor to match the expected input structure.

AssertionError: len(coords) != 4

  • Explanation: This error arises when the coords parameter does not contain exactly four integers.
  • Solution: Provide a list of four integers for the coords parameter, specifying the start and end positions for both height and width.

Paste Image with Coords Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_pytorch360convert
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.