sampler_name

This commit is contained in:
2023-06-23 03:10:09 +08:00
parent ec33c9fafd
commit 0be4a4bff6
2 changed files with 1 additions and 23 deletions

View File

@@ -41,29 +41,6 @@ type Image struct {
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
//// 参数校验
//func (img *Image) ParameterCheck() (err error) {
// if img.NumInferenceSteps <= 0 {
// img.NumInferenceSteps = 20
// }
// if img.NumInferenceSteps > 500 {
// img.NumInferenceSteps = 500
// }
// if img.GuidanceScale <= 0 {
// img.GuidanceScale = 1
// }
// if img.GuidanceScale > 20 {
// img.GuidanceScale = 20
// }
// if img.Scheduler == "" {
// img.Scheduler = "DDIM"
// }
// if img.Seed == "" {
// img.Seed = "0"
// }
// return
//}
// 将图片输出为指定尺寸的 webp 格式(默认使用 Lanczos 缩放算法)
func (img *Image) ToWebP(width int, height int, fit string) ([]byte, error) {
// 從絕對路徑讀原始圖片