Dreambooth-Stable-Diffusion icon indicating copy to clipboard operation
Dreambooth-Stable-Diffusion copied to clipboard

How to reduce the size of trained model ?

Open sausax opened this issue 2 years ago • 2 comments

Any ideas on how to reduce the size of the trained model from 12gb to 4gb(same as original stable diffusion checkpoint) ?

sausax avatar Sep 19 '22 13:09 sausax

I used this script which reduced it to 2gb in my case. https://github.com/harubaru/waifu-diffusion/blob/main/scripts/prune.py Replace "models/ldm/stable-diffusion-v1/model.ckpt" with the path to whatever ckpt file you want to prune

kitty7779 avatar Sep 19 '22 20:09 kitty7779

+1 on what @kitty7779 said.

This repo automatically prunes the ckpt down to 2GB after creation (takes about 15-20 extra seconds) https://github.com/JoePenna/Dreambooth-Stable-Diffusion/

Use main_prune.py for that.

JoePenna avatar Sep 19 '22 23:09 JoePenna