Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Krea 2 AnyPaint > Krea2 AnyPaint Prepare

ComfyUI Node: Krea2 AnyPaint Prepare

Class Name

Krea2AnyPaintPrepare

Category
Krea2/AnyPaint
Author
alexw5702-afk (Account age: 0days)
Extension
Krea 2 AnyPaint
Latest Updated
Github Stars
0.0K

How to Install Krea 2 AnyPaint

Install this extension via the ComfyUI Manager by searching for Krea 2 AnyPaint
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Krea 2 AnyPaint 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

Krea2 AnyPaint Prepare Description

Facilitates canvas preparation for extending images in ComfyUI's AnyPaint system.

Krea2 AnyPaint Prepare:

Krea2AnyPaintPrepare is a node designed to facilitate the preparation of a canvas for the Krea 2 AnyPaint system, which is part of the ComfyUI framework. This node is essential for setting up the initial conditions required for the AnyPaint process, which involves outpainting or extending images beyond their original boundaries. The primary function of this node is to prepare the source image and its associated mask, ensuring that the canvas is correctly configured for subsequent processing. By defining specific regions and parameters, Krea2AnyPaintPrepare allows you to control the area of the image that will be affected during the outpainting process. This node is particularly beneficial for artists and designers who wish to seamlessly extend their artwork while maintaining the integrity and style of the original image.

Krea2 AnyPaint Prepare Input Parameters:

source

The source parameter is a tensor representing the original image that you wish to extend or outpaint. It serves as the base canvas upon which the AnyPaint process will be applied. The quality and resolution of the source image can significantly impact the final output, so it is advisable to use high-quality images for best results.

left

The left parameter specifies the number of pixels from the left edge of the source image that will be included in the outpainting process. This parameter helps define the horizontal boundary of the area to be extended. It is an integer value, and its range depends on the dimensions of the source image.

top

The top parameter indicates the number of pixels from the top edge of the source image that will be included in the outpainting process. This parameter helps define the vertical boundary of the area to be extended. It is an integer value, and its range depends on the dimensions of the source image.

The right parameter specifies the number of pixels from the right edge of the source image that will be included in the outpainting process. This parameter, along with left, helps define the horizontal boundary of the area to be extended. It is an integer value, and its range depends on the dimensions of the source image.

bottom

The bottom parameter indicates the number of pixels from the bottom edge of the source image that will be included in the outpainting process. This parameter, along with top, helps define the vertical boundary of the area to be extended. It is an integer value, and its range depends on the dimensions of the source image.

reference_max_edge

The reference_max_edge parameter sets the maximum edge length for the reference image used in the outpainting process. This parameter ensures that the reference image is scaled appropriately, maintaining the aspect ratio while fitting within the specified maximum edge length. It is an integer value, and its default setting is typically determined by the system's requirements.

boundary_redraw_px

The boundary_redraw_px parameter defines the number of pixels at the boundary of the source image that will be redrawn during the outpainting process. This parameter helps create a seamless transition between the original image and the newly generated content. It is an integer value, and its default setting is typically determined by the system's requirements.

generated_mask

The generated_mask parameter is an optional tensor that represents the mask applied to the source image during the outpainting process. If not provided, a default mask of zeros is used, which means no masking is applied. This parameter allows for selective outpainting, where only specific regions of the image are extended.

Krea2 AnyPaint Prepare Output Parameters:

prepared_canvas

The prepared_canvas is a tuple containing the processed source image, the generated mask, and additional parameters required for the AnyPaint process. This output is crucial as it serves as the input for subsequent nodes in the AnyPaint pipeline, ensuring that the image is correctly prepared for outpainting.

Krea2 AnyPaint Prepare Usage Tips:

  • Ensure that the source image is of high quality and resolution to achieve the best outpainting results.
  • Adjust the left, top, right, and bottom parameters carefully to define the exact area of the image you wish to extend.
  • Use the reference_max_edge parameter to control the scaling of the reference image, ensuring it fits well within the desired dimensions.
  • If you want to focus the outpainting on specific areas, provide a custom generated_mask to guide the process.

Krea2 AnyPaint Prepare Common Errors and Solutions:

ValueError: AnyPaint expects a 4D or 5D image latent

  • Explanation: This error occurs when the input image latent does not have the expected dimensions.
  • Solution: Ensure that the input image latent is either 4D or 5D. Check the dimensions of your input and adjust accordingly.

ValueError: AnyPaint handles still images only; the latent time dimension must be 1

  • Explanation: This error indicates that the input image latent has a time dimension greater than 1, which is not supported.
  • Solution: Ensure that the input image is a still image with a time dimension of 1. Adjust the input data to meet this requirement.

Krea2 AnyPaint Prepare Related Nodes

Go back to the extension to check out more related nodes.
Krea 2 AnyPaint
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.

Krea2 AnyPaint Prepare