File size: 513 Bytes
0013734 8bf1132 0013734 8bf1132 0013734 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import torch
from safetensors.torch import load_file, save_file
# Load all three models
model_1 = load_file("merged_model_06.safetensors")
model_2 = load_file("merged_model_6.safetensors")
model_3 = load_file("merged_model_26.safetensors")
# Combine the models into a single dictionary
combined_model = {**model_1, **model_2, **model_3}
# Save the combined model as flowgram.safetensors
save_file(combined_model, "midflow_f16_low.safetensors")
print("Successfully merged the models into flowgram.safetensors") |