ComfyUI > Nodes > ComfyUI_Mira > Create Canvas

ComfyUI Node: Create Canvas

Class Name

CanvasCreatorSimple

Category
Mira/Util
Author
mirabarukaso (Account age: 1261days)
Extension
ComfyUI_Mira
Latest Updated
2024-07-25
Github Stars
0.03K

How to Install ComfyUI_Mira

Install this extension via the ComfyUI Manager by searching for ComfyUI_Mira
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Mira 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Create Canvas Description

Create canvas dimensions for images, with optional landscape mode for AI artists.

Create Canvas:

The CanvasCreatorSimple node is designed to create canvas dimensions for latent images, with an optional landscape mode that swaps the width and height. This node is particularly useful for AI artists who need to generate images with specific dimensions and orientations. By providing a straightforward interface, it allows you to easily set the width and height of your canvas, and optionally switch to landscape mode, making it versatile for various artistic needs. The main goal of this node is to simplify the process of defining canvas dimensions, ensuring that your images are generated with the correct proportions and orientation.

Create Canvas Input Parameters:

Width

The Width parameter specifies the width of the canvas in pixels. It allows you to set the desired width for your image, ensuring that it meets your specific requirements. The minimum value for this parameter is 16 pixels, and it can be increased in steps of 8 pixels. The default value is set to 576 pixels. Adjusting this parameter will directly impact the width of the generated canvas.

Height

The Height parameter specifies the height of the canvas in pixels. Similar to the Width parameter, it allows you to set the desired height for your image. The minimum value for this parameter is 16 pixels, and it can be increased in steps of 8 pixels. The default value is set to 1024 pixels. Adjusting this parameter will directly impact the height of the generated canvas.

Landscape

The Landscape parameter is a boolean switch that, when enabled, swaps the width and height of the canvas. This is useful for creating landscape-oriented images without manually adjusting the dimensions. The default value for this parameter is False, meaning the canvas will be in portrait mode by default. Enabling this parameter will switch the canvas to landscape mode, swapping the width and height values.

Create Canvas Output Parameters:

Width

The Width output parameter returns the width of the generated canvas. If the Landscape parameter is disabled, this value will be the same as the input Width. If the Landscape parameter is enabled, this value will be the same as the input Height.

Height

The Height output parameter returns the height of the generated canvas. If the Landscape parameter is disabled, this value will be the same as the input Height. If the Landscape parameter is enabled, this value will be the same as the input Width.

Create Canvas Usage Tips:

  • To create a portrait-oriented canvas, simply set the desired Width and Height values and leave the Landscape parameter disabled.
  • To create a landscape-oriented canvas, set the desired Width and Height values and enable the Landscape parameter to swap the dimensions.
  • Use the step increments of 8 pixels for Width and Height to ensure compatibility with other nodes and processes that may require specific dimension increments.

Create Canvas Common Errors and Solutions:

Invalid Width or Height Value

  • Explanation: The Width or Height value provided is outside the allowed range (less than 16 pixels or not a multiple of 8).
  • Solution: Ensure that the Width and Height values are within the allowed range and are multiples of 8 pixels.

Landscape Parameter Not Working

  • Explanation: The Landscape parameter is not correctly swapping the width and height values.
  • Solution: Verify that the Landscape parameter is set to True if you want to switch to landscape mode. Double-check the input values to ensure they are correctly assigned.

Create Canvas Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Mira
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.