53 lines
2.8 KiB
Markdown
53 lines
2.8 KiB
Markdown
# Stable-Diffusion-temperature-settings
|
|
Provides the ability to set the temperature for both UNET and CLIP. For ComfyUI.
|
|
|
|
## The nodes
|
|
|
|

|
|
|
|
## Specifities
|
|
|
|
- The CLIP patch ignores the connections and patches the model within the memory. Simply disconnecting it does not revert the behavior. To revert to default behavior set it at 1 or reload the model without the node connected. It is the only node ignoring the connections and does not modify anything but the connected CLIP model.
|
|
- For SD1 and SDXL nodes: settings the temperature at zero will use a dynamic scale proportional to the resolution. It is good for lower resolutions but not on point for higher.
|
|
|
|
## Usage
|
|
|
|
Like any other model patch:
|
|
|
|

|
|
|
|
- Pay attention to not use SD1 nodes on SDXL and vice-versa or you will get a key not found error.
|
|
|
|
## Requirements:
|
|
|
|
Requires pytorch 2.3 and above.
|
|
|
|
## Interesting side-effect:
|
|
|
|
Changing the UNET temperature allows to obtain better results a different resolutions. While it is not the full solution to the scaling issues of Stable Diffusion, it is a strong clue indicating the possibility to sample at much higher (or lower) resolutions.
|
|
|
|
# Examples
|
|
|
|
### Here using SDXL at a resolution of 328x328. First row temperature at 1, second row using dynamic scaled attention:
|
|
|
|

|
|
|
|
### Non cherry-picked SD v1-5-pruned-emaonly at 512*1024, first row with the dynamic scale, second without:
|
|
|
|

|
|
|
|
### Lost workflows for these as they were done during testing but proves the idea of making SD better at different resolutions:
|
|
|
|
The temperature was applied to all layers except input 1 and 2, output 9, 10 and 11. At 0.71. Only on self-attention. Using SD v1-5-pruned-emaonly. Resolution at 1024*512. The temperature matches 1/2**2 and the surface is double the normal resolution.
|
|
|
|

|
|

|
|

|
|
|
|
|
|
# Patreon
|
|
|
|
Consider giving an incentive to contributors.
|
|
|
|
https://www.patreon.com/extraltodeus
|