model
This commit is contained in:
20
README.md
20
README.md
@@ -87,21 +87,23 @@ type Tag struct {
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
type Model struct {
|
type Model struct {
|
||||||
ID int `json:"id" gorm:"primary_key"`
|
ID int `json:"id" gorm:"primary_key"` // 模型ID
|
||||||
Name string `json:"name"`
|
Name string `json:"name"` // 模型名稱
|
||||||
Type string `json:"type"` // (lora|ckp|hyper|ti)
|
Info string `json:"info"` // 模型描述
|
||||||
|
Type string `json:"type"` // 模型類型(lora|ckp|hyper|ti)
|
||||||
TriggerWords string `json:"trigger_words"` // 觸發詞
|
TriggerWords string `json:"trigger_words"` // 觸發詞
|
||||||
BaseModel string `json:"base_model"` // (SD1.5|SD2)
|
BaseModel string `json:"base_model"` // 基礎模型(SD1.5|SD2)
|
||||||
ModelPath string `json:"model_path"` // 模型路徑
|
ModelPath string `json:"model_path"` // 模型路徑(實際存放在服務器上的路徑)
|
||||||
Status string `json:"status" default:"initial"` // (initial|ready|waiting|running|success|error)
|
Status string `json:"status" default:"initial"` // (initial|ready|waiting|running|success|error)
|
||||||
Progress int `json:"progress"` // (0-100)
|
Progress int `json:"progress"` // (0-100)
|
||||||
Image string `json:"image"` // 封面圖片實際地址
|
Image string `json:"image"` // 封面圖片實際地址
|
||||||
Hash string `json:"hash"` // 模型哈希值
|
Hash string `json:"hash"` // 模型哈希值
|
||||||
Epochs int `json:"epochs"` // 訓練步數
|
Epochs int `json:"epochs"` // 訓練步數
|
||||||
Tags TagList `json:"tags"`
|
LearningRate float32 `json:"learning_rate"` // 學習率(0.000005)
|
||||||
UserID int `json:"user_id"`
|
Tags TagList `json:"tags"` // 模型標籤(標籤名數組)
|
||||||
DatasetID int `json:"dataset_id"`
|
UserID int `json:"user_id"` // 模型的所有者
|
||||||
ServerID int `json:"server_id"`
|
DatasetID int `json:"dataset_id"` // 模型所使用的數據集ID
|
||||||
|
ServerID string `json:"server_id"` // 模型所在服務器(訓練機或推理機)
|
||||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||||
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user