Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnumRNGType ¶
type EnumRNGType int
const ( STD_DEFAULT_RNG EnumRNGType = 0 CUDA_RNG EnumRNGType = 1 )
type EnumSDLogLevel ¶
type EnumSDLogLevel int
const ( DEBUG EnumSDLogLevel = 0 INFO EnumSDLogLevel = 1 WARN EnumSDLogLevel = 2 ERROR EnumSDLogLevel = 3 )
type EnumSampleMethod ¶
type EnumSampleMethod int
const ( EULER_A EnumSampleMethod = 0 EULER EnumSampleMethod = 1 HEUN EnumSampleMethod = 2 DPM2 EnumSampleMethod = 3 DPMPP2S_A EnumSampleMethod = 4 DPMPP2M EnumSampleMethod = 5 DPMPP2Mv2 EnumSampleMethod = 6 N_SAMPLE_METHODS EnumSampleMethod = 7 )
func ParseSampleMethod ¶
func ParseSampleMethod(s string) (EnumSampleMethod, error)
type EnumSchedule ¶
type EnumSchedule int
const ( DEFAULT EnumSchedule = 0 DISCRETE EnumSchedule = 1 KARRAS EnumSchedule = 2 N_SCHEDULES EnumSchedule = 3 )
func ParseSchedule ¶
func ParseSchedule(s string) (EnumSchedule, error)
type StableDiffusionModel ¶
type StableDiffusionModel struct {
// contains filtered or unexported fields
}
func InitStableDiffusion ¶
func InitStableDiffusion(fname string, nThreads int, schedule EnumSchedule) (StableDiffusionModel, error)
func (*StableDiffusionModel) Img2Img ¶
func (p *StableDiffusionModel) Img2Img(startImage image.Image, parameters TextGenPars) (image.Image, error)
Img2Img, not yet ready
func (*StableDiffusionModel) Txt2Img ¶
func (p *StableDiffusionModel) Txt2Img(parameters TextGenPars) (image.Image, error)
type TextGenPars ¶
type TextGenPars struct { Prompt string NegativePrompt string CfgScale float32 //7 default Width int Height int SampleMethod EnumSampleMethod SampleSteps int Strength float32 //needed for img2img Seed int64 }
Lets have parameters as struct.. so it is easier to store to exif etc...
Click to show internal directories.
Click to hide internal directories.