sampler_name
This commit is contained in:
@@ -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) {
|
||||
// 從絕對路徑讀原始圖片
|
||||
|
Reference in New Issue
Block a user