基于 huggingface diffuser 库本地部署 Stable diffusion

[复制链接]
查看939 | 回复0 | 2023-8-9 10:20:18 | 显示全部楼层 |阅读模式
前言

Stable Diffusion 是用 LAION-5B 的子集(图像大小为512*512)训练的扩散模型。此模型冻结 CLIP 的 ViT-L/14 文本编码器建模 prompt text。模型包含 860M UNet 和123M 文本编码器,可运行在具有至少10GB VRAM 的 GPU 上。
HF主页:https://huggingface.co/CompVis/stable-diffusion
Colab:https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/stable_diffusion.ipynb
diffusers官方文档:https://huggingface.co/docs/diffusers
接下来实战一下本地部署。
本地部署

1. 安装环境

[code]conda create -n diffenv python=3.8conda activate diffenvpip install diffusers==0.4.0pip install transformers scipy ftfy# pip install "ipywidgets>=7,
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则