How to convert pipeline.save_pretrained() to ckpt in the format of sd

How to convert pipeline.save_pretrained() to ckpt in the format of sd

and How to convert ckpt in the format of sd to pipeline.save_pretrained()