File size: 372 Bytes
267e820
 
92d22c6
 
267e820
92d22c6
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python3
from transformers import CLIPTextModel
from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
from diffusers import AutoencoderKL, UNet2DConditionModel

name = "./unet"
model = UNet2DConditionModel.from_pretrained(name)

model.save_pretrained(name, variant="no_ema")
model.save_pretrained(name, variant="fp16")