mk / co.py
pranavajay's picture
Update co.py
8bf1132 verified
raw
history blame
513 Bytes
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")