Upload lora-scripts/README-zh.md with huggingface_hub
Browse files- lora-scripts/README-zh.md +132 -0
lora-scripts/README-zh.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div align="center">
|
| 2 |
+
|
| 3 |
+
<img src="https://github.com/Akegarasu/lora-scripts/assets/36563862/3b177f4a-d92a-4da4-85c8-a0d163061a40" width="200" height="200" alt="SD-Trainer" style="border-radius: 25px">
|
| 4 |
+
|
| 5 |
+
# SD-Trainer
|
| 6 |
+
|
| 7 |
+
_✨ 享受 Stable Diffusion 训练! ✨_
|
| 8 |
+
|
| 9 |
+
</div>
|
| 10 |
+
|
| 11 |
+
<p align="center">
|
| 12 |
+
<a href="https://github.com/Akegarasu/lora-scripts" style="margin: 2px;">
|
| 13 |
+
<img alt="GitHub 仓库星标" src="https://img.shields.io/github/stars/Akegarasu/lora-scripts">
|
| 14 |
+
</a>
|
| 15 |
+
<a href="https://github.com/Akegarasu/lora-scripts" style="margin: 2px;">
|
| 16 |
+
<img alt="GitHub 仓库分支" src="https://img.shields.io/github/forks/Akegarasu/lora-scripts">
|
| 17 |
+
</a>
|
| 18 |
+
<a href="https://raw.githubusercontent.com/Akegarasu/lora-scripts/master/LICENSE" style="margin: 2px;">
|
| 19 |
+
<img src="https://img.shields.io/github/license/Akegarasu/lora-scripts" alt="许可证">
|
| 20 |
+
</a>
|
| 21 |
+
<a href="https://github.com/Akegarasu/lora-scripts/releases" style="margin: 2px;">
|
| 22 |
+
<img src="https://img.shields.io/github/v/release/Akegarasu/lora-scripts?color=blueviolet&include_prereleases" alt="发布版本">
|
| 23 |
+
</a>
|
| 24 |
+
</p>
|
| 25 |
+
|
| 26 |
+
<p align="center">
|
| 27 |
+
<a href="https://github.com/Akegarasu/lora-scripts/releases">下载</a>
|
| 28 |
+
·
|
| 29 |
+
<a href="https://github.com/Akegarasu/lora-scripts/blob/main/README.md">文档</a>
|
| 30 |
+
·
|
| 31 |
+
<a href="https://github.com/Akegarasu/lora-scripts/blob/main/README-zh.md">中文README</a>
|
| 32 |
+
</p>
|
| 33 |
+
|
| 34 |
+
LoRA-scripts(又名 SD-Trainer)
|
| 35 |
+
|
| 36 |
+
LoRA & Dreambooth 训练图形界面 & 脚本预设 & 一键训练环境,用于 [kohya-ss/sd-scripts](https://github.com/kohya-ss/sd-scripts.git)
|
| 37 |
+
|
| 38 |
+
## ✨新特性: 训练 WebUI
|
| 39 |
+
|
| 40 |
+
Stable Diffusion 训练工作台。一切集成于一个 WebUI 中。
|
| 41 |
+
|
| 42 |
+
按照下面的安装指南安装 GUI,然后运行 `run_gui.ps1`(Windows) 或 `run_gui.sh`(Linux) 来启动 GUI。
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
|
| 46 |
+
| Tensorboard | WD 1.4 标签器 | 标签编辑器 |
|
| 47 |
+
| ------------ | ------------ | ------------ |
|
| 48 |
+
|  |  |  |
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
# 使用方法
|
| 52 |
+
|
| 53 |
+
### 必要依赖
|
| 54 |
+
|
| 55 |
+
Python 3.10 和 Git
|
| 56 |
+
|
| 57 |
+
### 克隆带子模块的仓库
|
| 58 |
+
|
| 59 |
+
```sh
|
| 60 |
+
git clone --recurse-submodules https://github.com/Akegarasu/lora-scripts
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## ✨ SD-Trainer GUI
|
| 64 |
+
|
| 65 |
+
### Windows
|
| 66 |
+
|
| 67 |
+
#### 安装
|
| 68 |
+
|
| 69 |
+
运行 `install-cn.ps1` 将自动为您创建虚拟环境并安装必要的依赖。
|
| 70 |
+
|
| 71 |
+
#### 训练
|
| 72 |
+
|
| 73 |
+
运行 `run_gui.ps1`,程序将自动打开 [http://127.0.0.1:28000](http://127.0.0.1:28000)
|
| 74 |
+
|
| 75 |
+
### Linux
|
| 76 |
+
|
| 77 |
+
#### 安装
|
| 78 |
+
|
| 79 |
+
运行 `install.bash` 将创建虚拟环境并安装必要的依赖。
|
| 80 |
+
|
| 81 |
+
#### 训练
|
| 82 |
+
|
| 83 |
+
运行 `bash run_gui.bash`,程序将自动打开 [http://127.0.0.1:28000](http://127.0.0.1:28000)
|
| 84 |
+
|
| 85 |
+
## 通过手动运行脚本的传统训练方式
|
| 86 |
+
|
| 87 |
+
### Windows
|
| 88 |
+
|
| 89 |
+
#### 安装
|
| 90 |
+
|
| 91 |
+
运行 `install.ps1` 将自动为您创建虚拟环境并安装必要的依赖。
|
| 92 |
+
|
| 93 |
+
#### 训练
|
| 94 |
+
|
| 95 |
+
编辑 `train.ps1`,然后运行它。
|
| 96 |
+
|
| 97 |
+
### Linux
|
| 98 |
+
|
| 99 |
+
#### 安装
|
| 100 |
+
|
| 101 |
+
运行 `install.bash` 将创建虚拟环境并安装必要的依赖。
|
| 102 |
+
|
| 103 |
+
#### 训练
|
| 104 |
+
|
| 105 |
+
训练
|
| 106 |
+
|
| 107 |
+
脚本 `train.sh` **不会** 为您激活虚拟环境。您应该先激活虚拟环境。
|
| 108 |
+
|
| 109 |
+
```sh
|
| 110 |
+
source venv/bin/activate
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
编辑 `train.sh`,然后运行它。
|
| 114 |
+
|
| 115 |
+
#### TensorBoard
|
| 116 |
+
|
| 117 |
+
运行 `tensorboard.ps1` 将在 http://localhost:6006/ 启动 TensorBoard
|
| 118 |
+
|
| 119 |
+
## 程序参数
|
| 120 |
+
|
| 121 |
+
| 参数名称 | 类型 | 默认值 | 描述 |
|
| 122 |
+
|------------------------------|-------|--------------|-------------------------------------------------|
|
| 123 |
+
| `--host` | str | "127.0.0.1" | 服务器的主机名 |
|
| 124 |
+
| `--port` | int | 28000 | 运行服务器的端口 |
|
| 125 |
+
| `--listen` | bool | false | 启用服务器的监听模式 |
|
| 126 |
+
| `--skip-prepare-environment` | bool | false | 跳过环境准备步骤 |
|
| 127 |
+
| `--disable-tensorboard` | bool | false | 禁用 TensorBoard |
|
| 128 |
+
| `--disable-tageditor` | bool | false | 禁用标签编辑器 |
|
| 129 |
+
| `--tensorboard-host` | str | "127.0.0.1" | 运行 TensorBoard 的主机 |
|
| 130 |
+
| `--tensorboard-port` | int | 6006 | 运行 TensorBoard 的端口 |
|
| 131 |
+
| `--localization` | str | | 界面的本地化设置 |
|
| 132 |
+
| `--dev` | bool | false | 开发者模式,用于禁用某些检查 |
|