--- license: mit base_model: - stable-diffusion-v1-5/stable-diffusion-v1-5 --- # Dark-Sushi-Mix-v1.5 on LLM8850 原模型地址:https://civitai.com/models/24779?modelVersionId=93208 当前为 **10 步扩散版本**,固定延迟 20×250 ms ≈ 5 s。 --- ## 1. 手动运行(开发调试) | 步骤 | 命令 | |------|------| | 启动后端 | `uvicorn api_10steps:app --host 0.0.0.0 --port 7888` | | 命令行生图 | `python gen_img.py` | | Web 界面 | `cd client && python app.py` 后访问 http://127.0.0.1:5000 | --- ## 2. 端侧一键自启(生产部署) > 开机后自动完成: > ① 启动后端 → ② 启动前端 → ③ 自动打开 Firefox 全屏展示 http://localhost:5000/ ### 2.1 一键启用 仓库根目录已内置脚本,直接执行: ```bash # 复制并设置启动脚本 sudo cp sd-launch.sh /opt/sd-launch.sh sudo chmod +x /opt/sd-launch.sh # 创建用户级自启动 mkdir -p ~/.config/autostart cp sd-launch.desktop ~/.config/autostart/ # 确保 Firefox 已安装 sudo apt update && sudo apt install firefox -y ``` ### 2.2 文件说明 - `sd-launch.sh` 统一启动脚本:切目录 → 后台启动后端 → 后台启动前端 → 等待端口 → 使用 Firefox kiosk 模式自动全屏打开。 - `sd-launch.desktop` 用户级自启动配置,在图形界面登录后自动执行脚本。 --- ## 3. 日志与维护 | 操作 | 命令 | |------|------| | 查看启动日志 | `tail -f /var/log/sd-launch/startup.log` | | 查看后端日志 | `tail -f /var/log/sd-launch/backend.log` | | 查看前端日志 | `tail -f /var/log/sd-launch/frontend.log` | | 查看浏览器日志 | `tail -f /var/log/sd-launch/browser.log` | | 手动重启 | `pkill -f sd-launch.sh && /opt/sd-launch.sh &` | | 停止服务 | `pkill -f uvicorn && pkill -f "python3 app.py" && pkill firefox` | --- ## 4. 常见问题 - **Firefox 没有自动打开** 确保已安装 Firefox:`sudo apt install firefox -y` - **重启后服务没启动** 检查 `~/.config/autostart/sd-launch.desktop` 是否存在 - **端口冲突** 修改脚本中的 `7888` / `5000` 端口即可 - **手动测试浏览器** 运行:`firefox --kiosk http://localhost:5000/` --- ## 5. 验证部署 重启系统后,应该看到: 1. 自动启动后端服务(端口 7888) 2. 自动启动前端服务(端口 5000) 3. Firefox 自动全屏打开 SD 生图界面 至此,AX650 端侧即可实现 **插电即跑** 的 Dark-Sushi-Mix-v1.5 体验。