This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NO LONGER MAINTAINED | |
# There is an improved version in my ComfyUI-bleh node pack: | |
# https://github.com/blepping/ComfyUI-bleh#blehsageattentionsampler | |
# If you really want to use the gist, see the previous revision. | |
# Install https://github.com/thu-ml/SageAttention | |
# Put this file in custom_nodes/ - it will add a SageAttention node. | |
# NOTES: | |
# 1. Not an actual model patch, to enable or disable you must ensure the node runs. | |
# 2. No point in using this for SD15 as none of the dimensions are compatible (it will just delegate). | |
# 3. It will delegate to the default attention whenever the head dimensions are incompatible or k, v dimensions don't match q. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint. | |
# *Only* converts the UNet, VAE, and Text Encoder. | |
# Does not convert optimizer state or any other thing. | |
import argparse | |
import os.path as osp | |
import torch | |