为diffusers提供的统一稳定扩散管道
项目描述
diffusion-ui-backend
Gradio 后端为diffusion-ui 网页前端,使用统一稳定扩散diffusers管道
Gradio界面为Stable Diffusion 提供API以生成以下类型的图像:
- 文本到图像
- 图像到图像
- 修复
文档
文档可在此处找到
安装
详细安装说明可在文档中找到。
首先安装具有cuda支持的pytorch(如果您有NVIDIA GPU)
conda install pytorch torchvision torchaudio cudatoolkit=11.6 -c pytorch -c conda-forge
然后安装diffusionui及其依赖项
pip install diffusionui
首次使用
首次使用时,您需要下载模型
- 在https://hugging-face.cn 上创建账户
- 点击此页面接受许可协议
- 在设置中生成令牌
- 使用
huggingface-cli login
在控制台中登录 - 然后使用以下命令下载模型
# using the low-memory model (for GPUs with low VRAM)
diffusionui --low-mem --download-model
# or using the full model
diffusionui --download-model
使用方法
一旦模型下载完成,您可以通过运行以下命令来启动后端:
# For the low-memory model
diffusionui --low-mem
# For the full model
diffusionui
它应该为Gradio界面生成一个本地URL
Running on local URL: http://127.0.0.1:7860/