floyo logobeta logo
Powered by
ThinkDiffusion
floyo logobeta logo
Powered by
ThinkDiffusion

Comfy swap and scale

0

Last updated
2025-05-31

Custom ComfyUI node designed to facilitate the swapping of height and width inputs effortlessly. It also allows users to scale both dimensions to a 32px increment while ensuring the total pixel count does not exceed 1 Megapixel.

  • Enables quick swapping of width and height for easy adjustments.
  • Imposes a maximum output resolution of 1 Megapixel, which is beneficial for specific models.
  • Resizes dimensions to multiples of 32 pixels, optimizing the creation of new images.

Context

This tool serves as a custom node within the ComfyUI framework, primarily aimed at enhancing the manipulation of image dimensions. Its main purpose is to provide users with an efficient way to switch width and height values, while also applying size constraints that are critical for certain image processing tasks.

Key Features & Benefits

The ability to swap width and height inputs allows for rapid adjustments in image orientation, which can be crucial during various stages of the design process. Additionally, limiting the total output to 1 Megapixel ensures that images remain manageable in size, which is particularly useful for models that require lower resolution inputs to function optimally. The resizing feature to factors of 32 pixels is especially advantageous for generating new images that conform to specific requirements.

Advanced Functionalities

This node's advanced capabilities include the enforcement of both the 1 Megapixel limit and the 32px scaling factor, which together help maintain a balance between image quality and processing efficiency. Users can leverage these features to ensure their images meet the necessary specifications without manual recalculations.

Practical Benefits

By integrating this tool into their workflows, users can significantly enhance their control over image dimensions, thereby improving the overall quality and efficiency of their projects in ComfyUI. The streamlined process of swapping dimensions and scaling images reduces the time spent on manual adjustments, allowing for a more productive creative experience.

Credits/Acknowledgments

This project was developed by the original author and contributors, and it is licensed under the MIT License, providing users the freedom to modify and distribute the tool as needed.