Stable Diffusion Base Model from safetensors transfer to diffusers

文章描述了如何从HF克隆ControlNet模型仓库,下载SD.safetensors文件,然后使用Python脚本将其转换为diffusers格式,涉及模型转换和路径设置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Steps

File Setup
  1. Clone the ControlNet model repo from HF into a folder like hf_controlnet_model
git clone https://huggingface.co/lllyasviel/sd-controlnet-canny hf_controlnet_model
  1. Download your SD .safetensors of choice into a folder like hf_sd_model
mkdir hf_sd_model
wget -O hf_sd_model/photographyAnd_10.safetensors https://civitai.com/api/download/models/9077
  1. Convert the SD .safetensors model to diffusers format
wget -O enhanced_convert_original_stable_diffusion_to_diffusers.py https://gist.githubusercontent.com/Pyr-000/8513eb989e44d7c4085216fab452d749/raw/2f26a22fe55cb82ce216ad0a035c07558678f6db/enhanced_convert_original_stable_diffusion_to_diffusers.py

python enhanced_convert_original_stable_diffusion_to_diffusers.py --checkpoint_path hf_sd_model/photographyAnd_10.safetensors --dump_path hf_sd_model --extract_ema
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值