manual_surgery / sd3_manual_surgery-test3_medium_incl_clips_t5xxlfp8.py
hanzogak's picture
Upload sd3_manual_surgery-test3_medium_incl_clips_t5xxlfp8.py
026001b verified
raw
history blame
392 Bytes
import torch
from safetensors.torch import load_file, save_file
file_path = "./sd3_medium_incl_clips_t5xxlfp8.safetensors"
loaded = load_file(file_path)
for i in loaded:
#print(i)
if i.find(".attn.qkv.weight") != -1:
print(i)
loaded[i] = loaded[i] * 1.05
save_file(loaded, "sd3_manual_surgery-test3_medium_incl_clips_t5xxlfp8.safetensors")
# manual surgery