SD3-Scaling

SD3-Scaling
★ 1

图像缩放潜变量处理SD3兼容ComfyUI节点
为 ComfyUI 提供符合 SD3 要求的图像与潜变量缩放,确保宽高可被64整除,避免采样器输入异常。
💡 在向采样器(如 img2img)传入前调整分辨率以满足 SD3 要求。
🍴 2 Forks💻 Python🔄 2024-06-15
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/f414772aa5c3
📄 README

SD3-Scaling

Tools for scaling images and latents appropriate to SD3 in ComfyUI

SD3 Image Scale To Total Pixels

This custom node is a wrapper for the builtin ImageScaleToTotalPixels that

works within the desired constraint of SD3 to operate on images whose

width and height are divisible by 64.

Generally *only use this node when scaling an input image intended to be passed to a sampler*

(img2img) as the SD3-specific resolution only applies to sampler inputs.

Inputs:

  • upscale_method—(inherited from ImageScaleToTotalPixels) see ComfyUI docs
  • megapixels—(inherited from ImageScaleToTotalPixels) the desired total megapixels of the resulting image, see below
  • Outputs:

  • image—The scaled image
  • SD3 wants input latents that have width and height divisible by 64. To meet this requirement, when scaling to a

    specific megapixel resolution, the resulting width and height are checked and reduced to the nearest value that

    is divisible by 64.

    Because no cropping is performed, some stretching may occur if either dimension needs to be reduced. Since you

    should be working at at least the megapixel range for your input image with SD3, this probably won’t be

    noticable, but you should be aware that this will occcur.