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