github 主页: StableStudio by Stability AI
1. 进入环境
cd workplace
conda activate sd2
2. 下载项目
git clone https://github.com/Stability-AI/StableStudio.git
cd StableStudio
3. 安装 Node.js
通过 NVM 安装,也可通过 Node.js 官网 安装
- 安装
curl
cd ~/Download
sudo apt update && sudo apt install curl -y
- 安装
nvm
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
-
重启环境
- Debian based systems:
source ~/.profile
- CentOS, Fedora and Redhat systems:
source ~/.bashrc
-
查找当前最新版本的
node.js
nvm ls-remote
- 下载最新的稳定版本
nvm install v18.16.0
- 查看当前本机存在的版本
nvm list
- 选择目标版本
nvm use 18.16.0
- 检查版本
node --version
4. 安装 Yarn
下方为官方推荐安装方法,也可通过
npm
安装,即:sudo npm install yarn -g
- 导入存储库的 GPG密钥,并通过运行以下命令将 Yarn APT 存储库添加到您的系统
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- 启用存储库后,更新软件包列表
sudo apt update
- 安装
Yarn
,并添加参数--no-install-recommends
跳过 Node.js 的安装
sudo apt install --no-install-recommends yarn
- 检查版本
yarn --version
5. 本地部署
- 添加
--host
参数以便其他计算机访问(内网)
yarn
yarn dev --host
6. 添加 API
- 进入本地项目界面,打开 URL
- 进入 DreamStudio 官网 并注册账号
- 复制
API keys
,并填入URL
中
- 翻到界面顶部点击
generate
7. 安装完成
- 注意留意自己的 余额