Skip to content

Instantly share code, notes, and snippets.

View zackzhou-work's full-sized avatar
🙂
Why rust?

Zack zackzhou-work

🙂
Why rust?
View GitHub Profile
@zackzhou-work
zackzhou-work / replace_vae.py
Created September 12, 2023 12:10 — forked from ProGamerGov/replace_vae.py
Replace the VAE in a Stable Diffusion model with a new VAE. Tested on v1.4 & v1.5 SD models
# Script by https://github.com/ProGamerGov
import copy
import torch
# Path to model and VAE files that you want to merge
vae_file_path = "vae-ft-mse-840000-ema-pruned.ckpt"
model_file_path = "v1-5-pruned-emaonly.ckpt"
# Name to use for new model file