Text-to-Image
Diffusers
English
StableDiffusionPipeline
stable-diffusion
Inference Endpoints
AdamOswald1 commited on
Commit
eccbce0
1 Parent(s): c945e73

Upload 3 files

Browse files
Files changed (3) hide show
  1. vae/kl-f8-anime.ckpt +3 -0
  2. vae/kl-f8-anime2.ckpt +3 -0
  3. vae/pruner.py +15 -0
vae/kl-f8-anime.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f11c4a99ddc28d0ad8bce0acc38bed310b45d38a3fe4bb367dc30f3ef1a4868
3
+ size 404657953
vae/kl-f8-anime2.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df3c506e51b7ee1d7b5a6a2bb7142d47d488743c96aa778afb0f53a2cdc2d38d
3
+ size 404662241
vae/pruner.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import argparse
3
+
4
+ parser = argparse.ArgumentParser()
5
+ parser.add_argument('--input', '-I', type=str, help='Input file to prune', required = True)
6
+ args = parser.parse_args()
7
+ file = args.input
8
+
9
+ checkpoint = torch.load(file)
10
+ new_sd = dict()
11
+ for k in checkpoint.keys():
12
+ if k != 'optimizer_states':
13
+ new_sd[k] = checkpoint[k]
14
+
15
+ torch.save(new_sd, f'pruned-{file}')