Skip to content

Instantly share code, notes, and snippets.

@edicam
edicam / peft.py
Created September 24, 2024 15:26
Script to convert the .pt slider to an usable .safetensors slider
import os.path
from collections import OrderedDict
from safetensors.torch import save_file
import torch
state_dict=torch.load("path to your slider.pt")
alpha_keys = [
'lora_unet_single_transformer_blocks_0_attn_to_q.alpha'