Skip to content

Instantly share code, notes, and snippets.

View jachiam's full-sized avatar

Josh Achiam jachiam

View GitHub Profile
@jachiam
jachiam / convert_diffusers_to_sd_colab.py
Last active July 29, 2023 19:40
Copy and paste this into a colab cell to use the model conversion script
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch