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 > ComfyUI-Desert-Pixel-Nodes > DP Custom Aspect Ratio

ComfyUI Node: DP Custom Aspect Ratio

Class Name

DP Custom Aspect Ratio

Category
DP/utils
Author
DesertPixelAi (Account age: 840days)
Extension
ComfyUI-Desert-Pixel-Nodes
Latest Updated
2025-06-22
Github Stars
0.03K

How to Install ComfyUI-Desert-Pixel-Nodes

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

DP Custom Aspect Ratio Description

Allows custom width and height settings for precise aspect ratio control in projects.

DP Custom Aspect Ratio:

The DP Custom Aspect Ratio node is designed to provide you with the flexibility to define custom dimensions for your projects, allowing you to specify both width and height according to your specific needs. This node is particularly beneficial when you require precise control over the aspect ratio of your output, which can be crucial for various artistic and design applications. By enabling you to set custom dimensions, this node ensures that your creative vision is not limited by predefined aspect ratios, offering a tailored approach to image and video processing. Its primary function is to return the dimensions you specify, making it an essential tool for artists who need to work with specific size requirements.

DP Custom Aspect Ratio Input Parameters:

width

The width parameter allows you to specify the desired width of your output in pixels. It plays a crucial role in determining the horizontal dimension of your project. The width can be set within a range of 256 to 2048 pixels, with a default value of 1024 pixels. This flexibility ensures that you can adjust the width to suit the specific requirements of your project, whether you are working on a small-scale design or a larger format. The step value of 8 pixels allows for fine-tuning, ensuring that you can achieve the exact width needed for your creative work.

height

The height parameter allows you to specify the desired height of your output in pixels. It is essential for defining the vertical dimension of your project. Similar to the width, the height can be set within a range of 256 to 2048 pixels, with a default value of 1024 pixels. This parameter provides the flexibility to adjust the height according to the specific needs of your project, whether you are creating a portrait or landscape-oriented design. The step value of 8 pixels allows for precise adjustments, ensuring that you can achieve the exact height required for your artistic vision.

DP Custom Aspect Ratio Output Parameters:

custom_settings

The custom_settings output parameter provides a tuple containing the width and height values you have specified. This output is crucial as it encapsulates the custom dimensions you have defined, allowing you to use these settings in subsequent nodes or processes. By returning the dimensions as a tuple, the node ensures that you have a clear and concise representation of your custom aspect ratio, which can be easily integrated into your workflow. This output is particularly important for maintaining consistency and accuracy in your projects, as it allows you to apply the same dimensions across different stages of your creative process.

DP Custom Aspect Ratio Usage Tips:

  • To achieve the best results, ensure that the width and height values you specify are multiples of 8, as this can help maintain compatibility with other nodes and processes that may require dimensions to be aligned to specific boundaries.
  • Consider using this node when you need to create outputs with non-standard aspect ratios, as it allows you to bypass the limitations of predefined ratios and tailor the dimensions to your specific needs.

DP Custom Aspect Ratio Common Errors and Solutions:

Invalid width or height value

  • Explanation: This error occurs when the specified width or height is outside the allowed range of 256 to 2048 pixels or is not a multiple of 8. - Solution: Ensure that the width and height values are within the specified range and are multiples of 8. Adjust the values accordingly to meet these criteria.

TypeError: 'NoneType' object is not iterable

  • Explanation: This error may occur if the node is expecting a tuple for custom_settings but receives a None value instead.
  • Solution: Ensure that when using custom settings, a valid tuple containing both width and height is provided. Double-check the input to confirm that it is correctly formatted.

DP Custom Aspect Ratio Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Desert-Pixel-Nodes
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.

DP Custom Aspect Ratio