支持宽高与负面提示词

This commit is contained in:
2023-07-12 15:34:36 +08:00
parent 050637dcd8
commit f090ccd4d4
2 changed files with 14 additions and 0 deletions

View File

@@ -142,6 +142,8 @@ func ImagesPost(w http.ResponseWriter, r *http.Request) {
Seed int `json:"seed"` // 随机种子(单张图生成时使用)
NIter int `json:"n_iter"` // 生成数量
ModelID int `json:"model_id"` // 模型ID
Width int `json:"width"` // 图片宽度
Height int `json:"height"` // 图片高度
}{}
body, err := ioutil.ReadAll(r.Body)
if err != nil {
@@ -196,6 +198,9 @@ func ImagesPost(w http.ResponseWriter, r *http.Request) {
image.CfgScale = template.CfgScale
image.SamplerName = template.SamplerName
image.Seed = template.Seed
image.ModelID = template.ModelID
image.Width = template.Width
image.Height = template.Height
image_list = append(image_list, image)
}