How do you convert the *.safetensor files?

#1
by zigakerec - opened

Hey, thank you for your amazing work. Could you share the details of converting the models to diffusers? Thanks!

I am using diffusers version 0.16.1 for compatibility reasons. The conversion command for the inpainting model is provided below. The script is executed twice in order to generate two different extensions: .bin and .safetensors. This process should yield the same files as those found in this repository.

pip install diffusers==0.16.1
git clone https://github.com/huggingface/diffusers.git
cd diffusers
git checkout refs/tags/v0.16.1
python scripts/convert_original_stable_diffusion_to_diffusers.py --checkpoint_path realisticVisionV51_v51VAE-inpainting.safetensors --original_config_file v1-inpainting-inference.yaml --image_size 512 --from_safetensors --dump_path realisticVisionV51_v51VAE-inpainting --half --extract_ema
python scripts/convert_original_stable_diffusion_to_diffusers.py --checkpoint_path realisticVisionV51_v51VAE-inpainting.safetensors --original_config_file v1-inpainting-inference.yaml --image_size 512 --from_safetensors --to_safetensors --dump_path realisticVisionV51_v51VAE-inpainting --half --extract_ema

Sign up or log in to comment