我用香橙派 5 生成了 100 个漂亮小姐姐,效果惊艳!

本文将指导你如何使用 Conda 配置运行环境,并在 RKNN 上运行 Stable Diffusion 1.5 LCM ONNX,实现高效的本地 AI 图片生成。实现小姐姐自由。

image.png

为爱发电,如果对你有帮助,请不吝点赞关注,谢谢 😁


1. 配置 Python 环境(Conda)

为了确保环境干净可控,我们推荐使用 Conda 创建虚拟环境。

步骤 1:安装 Miniconda / Anaconda

如果尚未安装 Conda,请参考官方安装指南:

步骤 2:创建并激活 Conda 虚拟环境
conda create -n sd-rknn python=3.10 -y
conda activate sd-rknn

2. 配置项目及环境

git clone https://huggingface.co/happyme531/Stable-Diffusion-1.5-LCM-ONNX-RKNN2

sudo apt install python3-pip

pip install diffusers pillow 'numpy < 2' rknn-toolkit-lite2 torch transformers

download https://github.com/airockchip/rknn-toolkit2/blob/master/rknpu2/runtime/Linux/librknn_api/aarch64/librknnrt.so

sudo mv /home/jason/Downloads/librknnrt.so /usr/lib

cd Stable-Diffusion-1.5-LCM-ONNX-RKNN2

3. 运行命令行生成图片

送你两个命令行
python ./run_rknn-lcm.py -i ./model -o ./images --num-inference-steps 10 -s 512x512 --prompt "Full body image of a beautiful anime girl with perfect thic body shape in black sleeveless crop top, detailed face, manhwa style, princess core, tight short skirt and boots, --ar 1:2 --niji 6 --s 750, radiant skin."

image.png

python ./run_rknn-lcm.py -i ./model -o ./images --num-inference-steps 10 -s 512x512 --prompt "Full body image of a beautiful anime girl in sleeveless crop top, detailed faces, manhwa style, princess core, tight short skirt, --ar 1:2 --niji 6 --s 750"

image.png

生成的图片保存在项目的 images 文件夹下面:

image.png

恭喜各位大老爷实现小姐姐自由~ 🎉🎉🎉

不定期更新专业知识和有趣的技术内容,欢迎 点赞关注,你的支持是我继续创作的动力!😊

参考链接:
  1. https://huggingface.co/happyme531/Stable-Diffusion-1.5-LCM-ONNX-RKNN2
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值