Skip to content

Commit

Permalink
docs: update resolution usage
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Oct 28, 2022
1 parent 85da2e0 commit c807d74
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/theme/layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const { Layout } = DefaultTheme
align-items: center;
padding: 24px;
gap: 16px;
margin-top: 1rem;
border-radius: 12px;
min-height: 240px;
line-height: 18px;
Expand Down
12 changes: 4 additions & 8 deletions docs/deploy/naifu.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,15 @@ sudo apt install python3

### 启动

双击打开 `run.bat` 文件,或在终端中输入 `run.bat` 并按下回车,它会自动帮你启动 NAIFU。

::: tip
对于 Linux 用户则是运行 `./run.sh`
:::
双击打开 `run.bat` (对于 Linux 用户是 `run.sh`) 文件,或在终端中输入 `run.bat` 并按下回车,它会自动帮你启动 NAIFU。

当控制台界面显示 `Uvicorn running on http://0.0.0.0:6969` 时,说明 NAIFU 已经启动成功,你可以在浏览器中打开 `http://localhost:6969` 进行访问测试。

::: tip
如果你运行 NAIFU 的电脑和你的浏览器不在同一台电脑上,你需要将 `localhost` 改为电脑的 IP 地址。
:::

## 配置 `koishi-plugin-novelai` 插件
## 配置 novelai 插件

打开 Koishi 控制台,点击「插件配置」并选择「novelai」插件,将 `type` 更改为 `naifu`,并将 `endpoint` 改为上述的地址,最后点击右上角的「重载配置」按钮。

Expand All @@ -117,5 +113,5 @@ sudo apt install python3

### NAIFU 下载地址

- [磁力链接 (原版)](magnet:?xt=urn:btih:4a4b483d4a5840b6e1fee6b0ca1582c979434e4d&dn=naifu&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce)
- [百度网盘](https://pan.baidu.com/s/1AoQgHf5UJuXB2qDtQkOVeQ?pwd=RA00)提取码:RA00
- [磁力链接](magnet:?xt=urn:btih:4a4b483d4a5840b6e1fee6b0ca1582c979434e4d&dn=naifu&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce) (原版)
- [百度网盘](https://pan.baidu.com/s/1AoQgHf5UJuXB2qDtQkOVeQ?pwd=RA00) (提取码:RA00)
16 changes: 13 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,32 @@ negative prompt: loli
约稿 -m furry koishi
```

### 设置图片方向 (orient)
### 设置分辨率 (resolution)

::: warning
此选项在传入图片时不可用。
:::

可以用 `-o``--orient` 更改图片方向,可选值包括:
可以用 `-r``--resolution` 更改图片方向,可选值包括:

- `portrait`:768×512 (默认)
- `square`:640×640
- `landscape`:512×768

```
约稿 -o landscape koishi
约稿 -r landscape koishi
```

当启用了 [allowAnlas](./config.md#allowAnlas) 后,你还可以使用一对数字指定图片的具体长宽:

```
约稿 -r 1024x1024 koishi
```

::: tip
由于 Stable Diffusion 的限制,长宽都必须是 64 的倍数。
:::

### 切换采样器 (sampler)

可以用 `-s``--sampler` 设置采样器,可选值包括:
Expand Down

0 comments on commit c807d74

Please sign in to comment.