ComfyUI-yaResolutionSelector

ComfyUI-yaResolutionSelector
★ 16

分辨率管理宽高比像素保持自定义节点
一个可自定义基准分辨率和宽高比的分辨率选择节点,支持保持像素总数或将基准分辨率作为最长或最短边,以便灵活控制输出尺寸。
💡 在需调整分辨率或宽高比同时保持像素数或限定最长/最短边时使用。
🍴 7 Forks💻 Python🔄 2024-11-10
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/b45acaa3411d
Example
📄 README

Yet Another Resolution Selector (YARS)

A slightly different take on Resolution Selector nodes – freely adjust resolution and aspect ratio, maintain pixel count of StableDiffusion model, or hook it up to upscaling nodes to get that 5k 16:10 wallpaper in just few clicks.


Installation

Exactly the same as with other simple custom nodes.

  • Click the green Code button, select Download Zip, and unpack it in your ComfyUI custom_nodes directory
  • or

  • Clone this repository by running git clone https://github.com/Tropfchen/ComfyUI-yaResolutionSelector.git in your ComfyUI custom_nodes directory
  • To uninstall:

  • Delete ComfyUI-yaResolutionSelector in your ComfyUI custom_nodes directory
  • Use

    Simply right click on Empty Latent Image and choose one of Prepend yaResolution Selector, you can also find new nodes in utils menu.

    yaResolution Selector (Advanced)

    Recommend node with flexible ratio choice

  • base_resolution: in theory, this should match the base resolution of the model you’re using (512 for SD1.5, 1024 for SDXL).
  • Overextend: By default, with a 2:1 ratio and a base resolution of 512, the node will output 256×512. However, when ‘overextend’ is set to true, the output will be 512×1024. This is beneficial when using models that can still generate good images at resolutions larger than the base resolution.
  • constant_resolution: The node will attempt to output dimensions with the same pixel count as a 1:1 image generated with the base resolution. This outputs resolutions similar to those recommended for use with SDXL. It’s also useful with node connected to an image rescale node, especially when you know the maximum resolution that your GPU VRAM can safely handle.
  • yaResolution Selector

    Basic version for users that prefer aspect ratio presets. New presets can be added by modifying ratios.txt file (if you don’t have it, use the node at least once), remember to always include values in format width:height