Skip to content

ConnectAI-E/Feishu-Stablediffusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

古人云:道生一,一生二,二生StableDiffuion,StableDiffusion生万物 image

📷 点击展开完整功能截图

Txt2Img:文生图

image image

Img2Txt:图生文

image

Img2Img:图生图

image


🎭 由stablediffusion赋能的飞书图片生成类机器人

🚀 Feishu SD 🚀

功能点

  • txt2img: 通过正反词生成图片,支持中英双语
  • img2img: 支持以图生图
  • img2txt: 支持 clip 模型识别图片内容
  • 显示StableDiffusion服务器的相关信息
  • 可以选择 model
  • 可以设置生成图片的 size、step 与 seed 等参数
  • 显示图片生成信息
  • ControlNet

部署 Stable Diffusion WebUI

项目使用Stable Diffusion WebUI作为后端(带 --api参数启动),飞书作为前端,通过机器人,不再需要打开网页,在飞书里就可以使用StableDiffusion进行各种创作!

📷 点击查看详细步骤

更新 python 版本

使用 pyenv 安装 Python 3.10.6

按以下命令依次执行

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
cd ~/.pyenv && src/configure && make -C src
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init -)"' >> ~/.profile
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
sudo apt install wget lzma liblzma-dev build-essential libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev 
pyenv install 3.10.6
pyenv global 3.10.6

切换国内 Linux 安装镜像

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim/etc/apt/sources.list

# 修改为下列源内容
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse 
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse 
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse 
deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse 
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse 
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse 
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse 
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse 
deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse 
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
# 源结束结束


sudo apt-get update
sudo apt-get upgrade

安装 Nvidia 驱动