Upload folder using huggingface_hub
Browse filesFiles changed (5)
- doudouyan_new.safetensorsAdded+3
- maozhan_new.safetensorsAdded+3
- niantu_new.safetensorsAdded+3
- qban_new.safetensorsAdded+3
- tmp.pyAdded+16
123version https://git-lfs.github.com/spec/v1oid sha256:2902acdb322738d3699d4e49c15e3178c6d3c34ac72c3c280b884420bb7579c1size 612742344123version https://git-lfs.github.com/spec/v1oid sha256:a6bdcb966484661da794bc84204dabc023d9f37528e8845e327ab9bee4a05c4asize 306426712123version https://git-lfs.github.com/spec/v1oid sha256:b268f59578a6672d45b3ff09bd4f62e59fa31ad94311fc1fdc0187972d2102e2size 19253280123version https://git-lfs.github.com/spec/v1oid sha256:8e8a07dfb3e0831096d53a6685baacd251544f5cfe240f5f29cee9aa1cd4b5dasize 61274234412345678910111213141516import osimport randomfrom safetensors.torch import load_file, save_file
#ckpt_path = "dunhuang.safetensors"#ckpt_path = "hanfu.safetensors"ckpts = os.listdir(".")for ckpt_path in ckpts: if "tmp" in ckpt_path or "new" in ckpt_path: continue
new_ckpt_path = ckpt_path.replace(".safetensors", "_new.safetensors") weights = load_file(ckpt_path) for key in weights: weights[key] += random.uniform(0, 1) * 1e-7 save_file(weights, new_ckpt_path) print(f"Modified weights saved to {new_ckpt_path}")doudouyan_new.safetensorsAdded+3
maozhan_new.safetensorsAdded+3
niantu_new.safetensorsAdded+3
qban_new.safetensorsAdded+3
tmp.pyAdded+16