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 > Krea2_ComfyUI_Advanced > Eric Krea2 Resolution

ComfyUI Node: Eric Krea2 Resolution

Class Name

EricKrea2Resolution

Category
Eric/Krea2
Author
EricRollei (Account age: 1769days)
Extension
Krea2_ComfyUI_Advanced
Latest Updated
2026-11-13
Github Stars
0.02K

How to Install Krea2_ComfyUI_Advanced

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

Eric Krea2 Resolution Description

Calculates Krea 2 canvas dimensions and creates a packed latent from presets or images.

Eric Krea2 Resolution:

EricKrea2Resolution determines a suitable image canvas size for Krea 2 workflows and creates a corresponding packed latent canvas. You can calculate the resolution from an aspect-ratio preset and a target megapixel value, or provide a source image so the node uses that image's dimensions instead. The calculated or detected dimensions are rounded to multiples of 16, which keeps them compatible with the underlying latent-processing requirements. The node can optionally swap the resulting orientation and can fill the latent canvas with either reproducible random noise or zeros. This makes it useful for preparing image-to-image, refinement, and full-denoise workflows while also providing readable width, height, and dimension information for connecting to other nodes.

Eric Krea2 Resolution Input Parameters:

aspect_ratio

Selects the aspect-ratio preset used when no source image is connected. The preset determines the relationship between width and height, while megapixels determines the approximate total image area. The available choices are the aspect-ratio entries provided by the node, with 5:4 landscape as the default. This setting is ignored when an image is connected because the source image establishes the dimensions directly. The chosen ratio is also affected by swap_orientation, which can exchange the calculated width and height.

megapixels

Sets the target image area in megapixels when no source image is connected. The node combines this target area with aspect_ratio to calculate width and height, then rounds both dimensions to the nearest multiple of 16. The minimum value is 0.05, the maximum is 16.0, the default is 3.00, and the adjustment step is 0.05. Because the final dimensions are rounded, the actual pixel area can be slightly different from the requested megapixel value. This setting is ignored when an image is connected.

image

Accepts an optional source image for image-to-image workflows. When connected, the node reads the image height and width directly, rounds each dimension to a multiple of 16, and ignores both aspect_ratio and megapixels. The source image's original dimensions are still reported in the node's internal resolution message, while the returned dimensions use the rounded values. Connect a Load Image output here when you want the Krea 2 workflow to preserve the source picture's general size and shape. No default image is provided.

swap_orientation

Swaps the calculated or source-image width and height. The default is False, meaning the normal orientation is preserved; setting it to True changes a landscape result into portrait or a portrait result into landscape without requiring a separate mirrored aspect-ratio preset. This option is applied after the node determines dimensions, so it works both with ratio-based sizing and with a connected source image.

fill

Chooses the initial contents of the generated KREA2_LATENT canvas. The available options are noise and zeros, with noise as the default. noise creates unit-variance random noise and is appropriate when you need a ready initialization for a full-denoise image-to-image or refinement pass. zeros creates an empty canvas and can be useful when another part of the workflow will provide or replace the latent content. The Krea 2 Ultra workflow re-noises an initialization at its configured start step, so when start_step is 0, the two fill choices are equivalent according to the node's description.

seed

Controls the random noise generated when fill is set to noise. Using the same seed with the same dimensions produces reproducible noise, which is useful when comparing workflow changes. The minimum is 0, the maximum is 18446744073709551615, and the default is 0. This value is ignored when fill is set to zeros, because no random noise is generated in that mode.

Eric Krea2 Resolution Output Parameters:

width

Returns the final canvas width in pixels after source selection, orientation swapping, and rounding. For ratio-based sizing, it is derived from aspect_ratio and megapixels; for source-image sizing, it is based on the connected image width and rounded to a multiple of 16. Use this integer when another node requires the Krea 2 Stage 1 width.

height

Returns the final canvas height in pixels after source selection, orientation swapping, and rounding. For ratio-based sizing, it is calculated together with width; for source-image sizing, it is based on the connected image height and rounded to a multiple of 16. Use this integer when another node requires the Krea 2 Stage 1 height.

dims

Returns the final dimensions as a text value in widthxheight format, such as 1536x1216. It is intended for displaying, labeling, or passing the resolved canvas size through workflows where a single readable dimension string is more convenient than separate numeric values. The value reflects the final dimensions after rounding and any orientation swap.

latent

Returns a KREA2_LATENT object containing a packed latent canvas with the selected width, height, VAE scale information, and either random noise or zeros according to fill. The latent is created on the CPU and is intended to be passed into the Krea 2 workflow, where the downstream Ultra node moves it to the required device. Its size is derived from the final pixel dimensions, so changing the resolution also changes the amount of latent data and the memory required by later processing.

Eric Krea2 Resolution Usage Tips:

  • For a new generation with no source image, choose the aspect-ratio preset that matches the composition you want and adjust megapixels to control overall detail and processing cost. The default target is 3.00 megapixels.

  • Connect a Load Image node to image for image-to-image work when the source image should determine the output shape. In this mode, aspect_ratio and megapixels do not affect the calculated dimensions.

  • Remember that dimensions are rounded to multiples of 16. A requested size may therefore produce a nearby, rather than exact, pixel area.

  • Enable swap_orientation when you want to reuse a landscape ratio for portrait output, or a portrait ratio for landscape output, without changing the selected ratio preset.

  • Use fill="noise" for a ready random initialization in a full-denoise or refinement workflow. Set seed to a fixed value when you need repeatable results while testing prompts or settings.

  • Use fill="zeros" when you specifically need an empty latent canvas or when another connected workflow is responsible for supplying the meaningful latent content. The seed has no effect in this mode.

  • Connect width and height to the Krea 2 Ultra node's corresponding Stage 1 size inputs when using this node as the resolution controller. Pass latent to the matching Krea 2 latent input when the downstream workflow expects the generated canvas.

  • Higher megapixel values create larger canvases and can increase generation time and memory use. Start with a moderate value and increase it only when the additional resolution is needed.

Eric Krea2 Resolution Common Errors and Solutions:

KeyError or an invalid aspect-ratio selection

  • Explanation: The selected ratio must be one of the aspect-ratio presets registered by the node. A manually entered or outdated value may not match the available preset keys.
  • Solution: Select an option directly from the aspect_ratio dropdown. Avoid manually supplying a label that is not present in the current node version.

TypeError or an error while reading image.shape

  • Explanation: The connected value is not a valid ComfyUI IMAGE tensor in the expected image format. The node expects an image with batch, height, width, and channel dimensions.
  • Solution: Connect the output of a compatible image-loading or image-processing node to image. Disconnect the input temporarily to confirm that the ratio-and-megapixel mode works.

RuntimeError while creating or packing the latent

  • Explanation: The requested dimensions may require more memory than is available, or a downstream installation may not provide the expected Krea 2 latent support.
  • Solution: Lower megapixels, use a smaller source image, and confirm that the Krea 2 custom node and its latent support are installed correctly. Large canvases require more memory during later generation stages.

RuntimeError: Expected ... device ... in a downstream Krea 2 node

  • Explanation: This resolution node creates the latent on the CPU by design. The downstream Ultra node is expected to move it to the appropriate device, but another consumer may not handle the latent device correctly.
  • Solution: Connect the latent output directly to the Krea 2 node intended to consume KREA2_LATENT. Avoid routing it through nodes that expect a different latent format or device unless those nodes explicitly support this type.

ValueError or invalid value for megapixels

  • Explanation: The requested target is outside the supported range of 0.05 to 16.0 megapixels.
  • Solution: Set megapixels within the allowed range. Values near the upper limit can require substantial memory, so reduce the value if generation becomes unstable.

ValueError or invalid value for seed

  • Explanation: The seed must be an integer from 0 through 18446744073709551615. Non-integer values or values outside this range cannot be used for the noise generator.
  • Solution: Enter a whole-number seed within the supported range. If you select fill="zeros", the seed is ignored, but it should still remain a valid integer value.

dims does not match the original image dimensions

  • Explanation: When an image is connected, the node rounds its width and height to multiples of 16, so the output can differ slightly from the source image size.
  • Solution: Treat the width, height, and dims outputs as the actual dimensions used by the Krea 2 workflow. If the orientation is also unexpected, check whether swap_orientation is enabled.

The output appears rotated or has the opposite orientation

  • Explanation: swap_orientation exchanges the final width and height after the node calculates or reads them.
  • Solution: Set swap_orientation to False for the source or preset's normal orientation, or enable it deliberately when you need the opposite orientation.

Eric Krea2 Resolution Related Nodes

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

Eric Krea2 Resolution