This commit is contained in:
2023-04-28 06:32:33 +08:00
parent eb22bf188e
commit 115d948d0f
10 changed files with 1045 additions and 422 deletions

View File

@@ -44,6 +44,21 @@ WS | /api/{name}/{item_id} | Websocket 連接對象
對象模型:
```go
type Model struct {
ID int `json:"id"`
Name string `json:"name"`
Type string `json:"type"` // (lora|ckp|hyper|ti)
TriggerWords string `json:"trigger_words"` // 觸發詞
BaseModel string `json:"base_model"` // (SD1.5|SD2)
ModelPath string `json:"model_path"` // 模型路徑
Status string `json:"status"` // (waiting|running|success|error)
Progress int `json:"progress"` // (0-100)
Tags []string `json:"tags"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
```
```javascript
//// TODO
////训练专属模型模块
@@ -94,17 +109,6 @@ WS | /api/{name}/{item_id} | Websocket 連接對象
}
}
// Model 模型對象
{
id: 'xxxxx', // 模型ID
name: 'xxx', // 模型名稱
type: '', // 模型類型(RoLa|SD2|SD1.5)
status: 'xxx', // 模型狀態(waiting|running|success|error)
progress: 100, // 訓練進度(0~100)
createdAt: '', // 創建時間
updatedAt: '', // 更新時間
}
// Task 任務對象
{
id: 'xxxxx', // 任務ID