comfyui-fofr-toolkit

comfyui-fofr-toolkit
★ 6

计数器分辨率管理长宽比ComfyUI工具
comfyui-fofr-toolkit 是一组简单的 ComfyUI 工具节点,包含 Incrementer、按长宽比计算宽高和按目标分辨率缩放,便于索引计数与分辨率管理。
💡 用于流程中计数、计算及图像分辨率调整。
🍴 3 Forks💻 Python🔄 2024-08-09
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/8b0992d318c3
📄 README

🪴 comfyui-fofr-toolkit

Simple building block nodes for ComfyUI

Nodes

Incrementer

A simple counter with a max value.

Inputs:

  • current_index (required): An integer representing the current index. Default is 0.
  • max (optional): The maximum value before the counter resets. Default is 10.
  • Width and height from aspect ratio

    Calculates width and height based on a given aspect ratio and ideal target size.

    Inputs:

  • aspect_ratio (required): Choose from predefined aspect ratios (eg “1:1”, “16:9”, “21:9”).
  • target_size (required): The target size
  • multiple_of (optional): Ensure the output dimensions are multiples of this value (default 8, range 1-1024).
  • Width and height for scaling image to ideal resolution

    Calculates width and height for scaling an input image to a target resolution (for example 1024×1024 is a common ideal size) while maintaining its aspect ratio.

    For example, an image that is 3:2 with a target of 1024×1024 pixels will be scaled to 1256×840 (rather than the less ideal 1024×682).

    Inputs:

  • image (required): The input image to be scaled.
  • target_size (required): The target size for scaling. Default is 1024, range 64-8192.
  • multiple_of (optional): Ensure the output dimensions are multiples of this value (default 8, range 1-1024).