Skip to content

Instantly share code, notes, and snippets.

View wkpark's full-sized avatar

Won-Kyu Park wkpark

View GitHub Profile
@wkpark
wkpark / replace_vae.py
Last active June 22, 2023 16:08 — 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
#
# ChangeLog:
# - support safetensors, save float16 if needed, check filename 2023/06/22 by wkpark
#
import os
import sys
import copy
import torch