27 lines
1.1 KiB
Go
27 lines
1.1 KiB
Go
package models
|
|
|
|
import (
|
|
"main/configs"
|
|
)
|
|
|
|
type Image struct {
|
|
ID int `json:"id" gorm:"primary_key"`
|
|
Name string `json:"name"`
|
|
Width int `json:"width"`
|
|
Height int `json:"height"`
|
|
Prompt string `json:"prompt"`
|
|
NegativePrompt string `json:"negative_prompt"`
|
|
NumInferenceSteps int `json:"num_inference_steps"` // Number of inference steps (minimum: 1; maximum: 500)
|
|
GuidanceScale float32 `json:"guidance_scale"` // Scale for classifier-free guidance (minimum: 1; maximum: 20)
|
|
Scheduler string `json:"scheduler"` // (DDIM|K_EULER|DPMSolverMultistep|K_EULER_ANCESTRAL|PNDM|KLMS)
|
|
Seed int `json:"seed"` // Random seed (minimum: 0; maximum: 2147483647)
|
|
FromImage string `json:"from_image"` // Image to start from
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
UserID int `json:"user_id"`
|
|
}
|
|
|
|
func init() {
|
|
configs.ORMDB().AutoMigrate(&Image{})
|
|
}
|