Upload sd3_manual_surgery-test3_medium_incl_clips_t5xxlfp8.py
Browse files
sd3_manual_surgery-test3_medium_incl_clips_t5xxlfp8.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import torch
|
2 |
+
from safetensors.torch import load_file, save_file
|
3 |
+
file_path = "./sd3_medium_incl_clips_t5xxlfp8.safetensors"
|
4 |
+
loaded = load_file(file_path)
|
5 |
+
for i in loaded:
|
6 |
+
#print(i)
|
7 |
+
if i.find(".attn.qkv.weight") != -1:
|
8 |
+
print(i)
|
9 |
+
loaded[i] = loaded[i] * 1.05
|
10 |
+
save_file(loaded, "sd3_manual_surgery-test3_medium_incl_clips_t5xxlfp8.safetensors")
|
11 |
+
|
12 |
+
# manual surgery
|