Documentation ¶
Index ¶
- Constants
- Variables
- type CSDCtx
- func (c *CSDCtx) Close()
- func (c *CSDCtx) StableDiffusionImageToImage(initImg []byte, prompt string, negativePrompt string, cfgScale float32, ...) []byte
- func (c *CSDCtx) StableDiffusionLoadFromFile(path string, schedule Schedule)
- func (c *CSDCtx) StableDiffusionTextToImage(prompt string, negativePrompt string, cfgScale float32, width int, height int, ...) []byte
- type CStableDiffusion
- type OutputsImageType
- type RNGType
- type SDLogLevel
- type SampleMethod
- type Schedule
- type StableDiffusionModel
- type StableDiffusionOptions
Constants ¶
View Source
const ( DEBUG SDLogLevel = "DEBUG" INFO = "INFO" WARN = "WARN" ERROR = "ERROR" )
View Source
const ( EULER_A SampleMethod = "EULER_A" EULER = "EULER" HEUN = "HEUN" DPM2 = "DPM2" DPMPP2S_A = "DPMPP2S_A" DPMPP2M = "DPMPP2M" DPMPP2Mv2 = "DPMPP2Mv2" N_SAMPLE_METHODS = "N_SAMPLE_METHODS" )
View Source
const ( DEFAULT Schedule = "DEFAULT" DISCRETE = "DISCRETE" KARRAS = "KARRAS" N_SCHEDULES = "N_SCHEDULES" )
Variables ¶
View Source
var DefaultStableDiffusionOptions = StableDiffusionOptions{ Threads: -1, VaeDecodeOnly: true, FreeParamsImmediately: true, RngType: CUDA_RNG, Schedule: DEFAULT, NegativePrompt: "out of frame, lowers, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature", CfgScale: 7.0, Width: 500, Height: 500, SampleMethod: EULER_A, SampleSteps: 20, Strength: 0.4, Seed: 42, OutputsImageType: PNG, }
Functions ¶
This section is empty.
Types ¶
type CSDCtx ¶
type CSDCtx struct {
// contains filtered or unexported fields
}
func (*CSDCtx) StableDiffusionImageToImage ¶
func (*CSDCtx) StableDiffusionLoadFromFile ¶
type CStableDiffusion ¶
type CStableDiffusion struct {
// contains filtered or unexported fields
}
func NewCStableDiffusion ¶
func NewCStableDiffusion(libraryPath string) (*CStableDiffusion, error)
func (*CStableDiffusion) NewStableDiffusionCtx ¶
func (*CStableDiffusion) StableDiffusionGetSystemInfo ¶
func (cSD *CStableDiffusion) StableDiffusionGetSystemInfo() string
func (*CStableDiffusion) StableDiffusionSetLogLevel ¶
func (cSD *CStableDiffusion) StableDiffusionSetLogLevel(level SDLogLevel)
type OutputsImageType ¶
type OutputsImageType string
const ( PNG OutputsImageType = "PNG" JPEG = "JPEG" )
type RNGType ¶
type RNGType string
const ( STD_DEFAULT_RNG RNGType = "STD_DEFAULT_RNG" CUDA_RNG = "CUDA_RNG" )
type SDLogLevel ¶
type SDLogLevel string
type SampleMethod ¶
type SampleMethod string
type StableDiffusionModel ¶
type StableDiffusionModel struct {
// contains filtered or unexported fields
}
func NewStableDiffusionAutoModel ¶
func NewStableDiffusionAutoModel(options StableDiffusionOptions) (*StableDiffusionModel, error)
func NewStableDiffusionModel ¶
func NewStableDiffusionModel(dylibPath string, options StableDiffusionOptions) (*StableDiffusionModel, error)
func (*StableDiffusionModel) Close ¶
func (sd *StableDiffusionModel) Close() error
func (*StableDiffusionModel) ImagePredict ¶
func (*StableDiffusionModel) LoadFromFile ¶
func (sd *StableDiffusionModel) LoadFromFile(path string) error
type StableDiffusionOptions ¶
Click to show internal directories.
Click to hide internal directories.