segmind

package
v1.5.49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	R1024x1024 = Resolutions{Height: 1024, Width: 1024}
	R896x1152  = Resolutions{Height: 1152, Width: 896}
	R832x1216  = Resolutions{Height: 1216, Width: 832}
	R768x1344  = Resolutions{Height: 1344, Width: 768}
	R640x1536  = Resolutions{Height: 1536, Width: 640}
	R1216x832  = Resolutions{Height: 832, Width: 1216}
	R1344x768  = Resolutions{Height: 768, Width: 1344}
	R1536x640  = Resolutions{Height: 640, Width: 1536}
)

Functions

This section is empty.

Types

type Options added in v1.5.43

type Options func(*Segmind)

func WithApiKey added in v1.5.43

func WithApiKey(apiKey string) Options

func WithBatchSize added in v1.5.43

func WithBatchSize(batchSize int) Options

func WithResolution added in v1.5.43

func WithResolution(res Resolutions) Options

func WithS3Dir added in v1.5.43

func WithS3Dir(s3dir string) Options

type Resolutions added in v1.5.43

type Resolutions struct {
	Height int `json:"height"`
	Width  int `json:"width"`
}

type Segmind added in v1.5.43

type Segmind struct {
	Model     SegmindModels
	ApiKey    string
	BatchSize int
	Width     int
	Height    int
	S3Dir     string
}

func NewSegmind added in v1.5.43

func NewSegmind(model SegmindModels, opts ...Options) *Segmind

func (*Segmind) RequestCreateImage added in v1.5.43

func (s *Segmind) RequestCreateImage(prompt string) (*string, error)

type SegmindModels added in v1.5.43

type SegmindModels string
const (
	SegmindSDAPI          SegmindModels = "https://api.segmind.com/v1/stable-diffusion-3.5-large-txt2img"
	SegmindProtovisAPI    SegmindModels = "https://api.segmind.com/v1/sdxl1.0-protovis-lightning"
	SegmindSamaritanAPI   SegmindModels = "https://api.segmind.com/v1/sdxl1.0-samaritan-3d"
	SegmindDreamshaperAPI SegmindModels = "https://api.segmind.com/v1/sdxl1.0-dreamshaper-lightning"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL