Documentation
¶
Index ¶
Constants ¶
View Source
const ( TextToImageTask = "TASK_TEXT_TO_IMAGE" ImageToImageTask = "TASK_IMAGE_TO_IMAGE" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine struct { Description string `json:"description"` ID string `json:"id"` Name string `json:"name"` Type string `json:"type"` }
Engine represents a Stability AI Engine.
type Image ¶
type Image struct { Base64 string `json:"base64"` Seed uint32 `json:"seed"` FinishReason string `json:"finishReason"` }
Image represents a single image.
type ImageTaskRes ¶
type ImageTaskRes struct {
Images []Image `json:"artifacts"`
}
ImageTaskRes represents the response body for text-to-image API.
type ImageToImageInput ¶
type ImageToImageInput struct { Task string `json:"task"` Engine string `json:"engine"` Prompts []string `json:"prompts"` InitImage string `json:"init-image"` Weights *[]float64 `json:"weights,omitempty"` InitImageMode *string `json:"init-image-mode,omitempty"` ImageStrength *float64 `json:"image-strength,omitempty"` StepScheduleStart *float64 `json:"step-schedule-start,omitempty"` StepScheduleEnd *float64 `json:"step-schedule-end,omitempty"` CfgScale *float64 `json:"cfg-scale,omitempty"` ClipGuidancePreset *string `json:"clip-guidance-preset,omitempty"` Sampler *string `json:"sampler,omitempty"` Samples *uint32 `json:"samples,omitempty"` Seed *uint32 `json:"seed,omitempty"` Steps *uint32 `json:"steps,omitempty"` StylePreset *string `json:"style-preset,omitempty"` }
type ImageToImageOutput ¶
type ImageToImageReq ¶
type ImageToImageReq struct { TextPrompts []TextPrompt `json:"text_prompts"` InitImage string `json:"init_image"` CFGScale *float64 `json:"cfg_scale,omitempty"` ClipGuidancePreset *string `json:"clip_guidance_preset,omitempty"` Sampler *string `json:"sampler,omitempty"` Samples *uint32 `json:"samples,omitempty"` Seed *uint32 `json:"seed,omitempty"` Steps *uint32 `json:"steps,omitempty"` StylePreset *string `json:"style_preset,omitempty"` InitImageMode *string `json:"init_image_mode,omitempty"` ImageStrength *float64 `json:"image_strength,omitempty"` StepScheduleStart *float64 `json:"step_schedule_start,omitempty"` StepScheduleEnd *float64 `json:"step_schedule_end,omitempty"` // contains filtered or unexported fields }
ImageToImageReq represents the request body for image-to-image API
type TextPrompt ¶
TextPrompt holds a prompt's text and its weight.
type TextToImageInput ¶
type TextToImageInput struct { Task string `json:"task"` Prompts []string `json:"prompts"` Engine string `json:"engine"` Weights *[]float64 `json:"weights,omitempty"` Height *uint32 `json:"height,omitempty"` Width *uint32 `json:"width,omitempty"` CfgScale *float64 `json:"cfg-scale,omitempty"` ClipGuidancePreset *string `json:"clip-guidance-preset,omitempty"` Sampler *string `json:"sampler,omitempty"` Samples *uint32 `json:"samples,omitempty"` Seed *uint32 `json:"seed,omitempty"` Steps *uint32 `json:"steps,omitempty"` StylePreset *string `json:"style-preset,omitempty"` }
type TextToImageOutput ¶
type TextToImageReq ¶
type TextToImageReq struct { TextPrompts []TextPrompt `json:"text_prompts"` CFGScale *float64 `json:"cfg_scale,omitempty"` ClipGuidancePreset *string `json:"clip_guidance_preset,omitempty"` Sampler *string `json:"sampler,omitempty"` Samples *uint32 `json:"samples,omitempty"` Seed *uint32 `json:"seed,omitempty"` Steps *uint32 `json:"steps,omitempty"` StylePreset *string `json:"style_preset,omitempty"` Height *uint32 `json:"height,omitempty"` Width *uint32 `json:"width,omitempty"` // contains filtered or unexported fields }
TextToImageReq represents the request body for text-to-image API
Click to show internal directories.
Click to hide internal directories.