image
This commit is contained in:
		@@ -6,10 +6,19 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Image struct {
 | 
			
		||||
	ID        int    `json:"id"`
 | 
			
		||||
	Name      string `json:"name"`
 | 
			
		||||
	CreatedAt string `json:"created_at"`
 | 
			
		||||
	UpdatedAt string `json:"updated_at"`
 | 
			
		||||
	ID                int     `json:"id"`
 | 
			
		||||
	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"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (image *Image) Create() error {
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,9 @@ import (
 | 
			
		||||
type Task struct {
 | 
			
		||||
	ID        int    `json:"id"`
 | 
			
		||||
	Name      string `json:"name"`
 | 
			
		||||
	Type      string `json:"type"`
 | 
			
		||||
	Type      string `json:"type"`     // 任務類型(訓練|推理)
 | 
			
		||||
	Status    string `json:"status"`   // (waiting|running|success|error)
 | 
			
		||||
	Progress  int    `json:"progress"` // (0-100)
 | 
			
		||||
	CreatedAt string `json:"created_at"`
 | 
			
		||||
	UpdatedAt string `json:"updated_at"`
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user