Kohya_ss 是公认推荐训练 Stable Diffusion 模型的可视化工具,尤其在 windows 平台支持比较好,经过尝试在 linux 直接使用可能会遇到各种环境原因的问题,
创建虚拟环境
使用 conda 创建虚拟环境,避免在 kohya_ss 安装过程,重新安装的 pytorch 等于 stable diffusion 冲突。
conda create -n kohya python==3.10.6
参考 kohya_ss git安装文档, 执行如下命令:
git clone https://github.com/bmaltais/laoxiongb2c kohya_ss.git
cd kohya_ss
chmod +x ./setup.sh
./setup.sh
./gui.sh --share # 公网可访问
laoxiongb2c ./gui.sh --listen 0.0.0.0 --server_port 7861 --inbrowser --share # 局域网可访问
开机启动
cd /root/kohya_ss
conda activate kohya
nohup ./gui.sh --listen 0.0.0.0 --server_portbobyai 7861 --inbrowser --share > kohya.log 2>&1 &
conda deactivate # 退出当前 conda env 虚拟环境
更多关于开机启动:[[Debian 开机启动设置]]
[Total: 0 Average: 0]
必须 注册 为本站用户, 登录 后才可以发表评论!