Upload folder using huggingface_hub
Browse files- doudouyan_new.safetensors +3 -0
- maozhan_new.safetensors +3 -0
- niantu_new.safetensors +3 -0
- qban_new.safetensors +3 -0
- tmp.py +16 -0
doudouyan_new.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2902acdb322738d3699d4e49c15e3178c6d3c34ac72c3c280b884420bb7579c1
|
| 3 |
+
size 612742344
|
maozhan_new.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6bdcb966484661da794bc84204dabc023d9f37528e8845e327ab9bee4a05c4a
|
| 3 |
+
size 306426712
|
niantu_new.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b268f59578a6672d45b3ff09bd4f62e59fa31ad94311fc1fdc0187972d2102e2
|
| 3 |
+
size 19253280
|
qban_new.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e8a07dfb3e0831096d53a6685baacd251544f5cfe240f5f29cee9aa1cd4b5da
|
| 3 |
+
size 612742344
|
tmp.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import random
|
| 3 |
+
from safetensors.torch import load_file, save_file
|
| 4 |
+
|
| 5 |
+
#ckpt_path = "dunhuang.safetensors"
|
| 6 |
+
#ckpt_path = "hanfu.safetensors"
|
| 7 |
+
ckpts = os.listdir(".")
|
| 8 |
+
for ckpt_path in ckpts:
|
| 9 |
+
if "tmp" in ckpt_path or "new" in ckpt_path: continue
|
| 10 |
+
|
| 11 |
+
new_ckpt_path = ckpt_path.replace(".safetensors", "_new.safetensors")
|
| 12 |
+
weights = load_file(ckpt_path)
|
| 13 |
+
for key in weights:
|
| 14 |
+
weights[key] += random.uniform(0, 1) * 1e-7
|
| 15 |
+
save_file(weights, new_ckpt_path)
|
| 16 |
+
print(f"Modified weights saved to {new_ckpt_path}")
|