DEBUG 宽高更正

This commit is contained in:
2023-07-12 15:38:53 +08:00
parent f090ccd4d4
commit 16f98bfffb
2 changed files with 8 additions and 8 deletions

View File

@@ -169,6 +169,12 @@ func ImagesPost(w http.ResponseWriter, r *http.Request) {
if template.CfgScale > 20 {
template.CfgScale = 20
}
if template.Width <= 0 {
template.Width = 512
}
if template.Height <= 0 {
template.Height = 512
}
if template.ModelID <= 0 {
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte("model_id 参数不能为空"))