Stable-Diffusion-temperature-settings

Stable-Diffusion-temperature-settings
★ 44

温度设置UNetCLIPSDXL/SD1.x兼容
为ComfyUI提供同时设置UNET和CLIP温度的功能,可切换兼容SD1.x与SDXL/Turbo的保质模式,防止放大或缩小时细节模糊。
💡 在ComfyUI中调整UNET与CLIP温度以保留放大/缩小时的细节。
🍴 9 Forks💻 Python🔄 2024-07-10
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/c73fe210bae7
image
combined_image_new
234523423
335007111-bf6d7ef0-9c18-4436-8037-6b60a6a37ce2
335007043-0c4540ab-1840-4230-940a-07a9e38ef38a
335007132-3379081c-2c4e-4af0-ba92-b57031b3845b
335007062-a4dc0de9-68b7-4158-b4fa-6c607862d04a
335007140-10991fbe-4123-46d2-8069-cfaece9e77ec
335007077-4d17e360-0e28-4fd2-98ae-8f6944114815
00752UI_00001_
00750UI_00001_
combined_pair_2
combined_pair_1
combined_pair_3
📄 README

Stable-Diffusion-temperature-settings

Provides the ability to set the temperature for both UNET and CLIP. For ComfyUI.

I also added a togglable function compatible with SD 1.x models and SDXL/Turbo which helps to preserve quality weither it is for downscaling or upscaling.

Usage

Like any other model patch:

CLIP temperature at 0.75, 1 and 1.25. Prompt “a bio-organic living plant spaceship”

The temperature scaling option allows to avoid smudged details during an upscale:

Without / with

This does not include tiled upscales since the tiling uses smaller latents as the workaround for this well known issue.

Using SDXL, 512×512, 256×256, 128×128 without / with modification on the U-Net:

Other examples on SDXL.

256×256 without / with

Using SD v1-5-pruned-emaonly:

This is one of my first tests and I only display it as the proof of concept, exposing the possibility to fix the scaling issues with the U-Net.

  • Lower temperature applied to all layers except input 1 and 2, output 9, 10 and 11 which were ignored.
  • At 0.71.
  • Only self-attention
  • Resolution at 1024*512
  • Patreon

    Provide an incentive to contributors:

    https://www.patreon.com/extraltodeus

    Pro tip:

    Did you know that my first activity is to write creative model merging functions?

    While the code is too much of a mess to be shared, I do expose and share my models. You can find them in this gallery! 😁