Documentation
¶
Index ¶
Constants ¶
View Source
const LogBufferSize = 1024 // from sd.cpp
Variables ¶
This section is empty.
Functions ¶
func CloseLibrary ¶
func OpenLibrary ¶
Types ¶
type CLogCallback ¶
type CStableDiffusionCtx ¶
type CStableDiffusionImpl ¶
type CStableDiffusionImpl struct { SDSetLogCallback func(callback func(level int, text *byte, data unsafe.Pointer) unsafe.Pointer, data int) SDSetResultCallback func(ctx unsafe.Pointer, callback func(num uint64, imageData *byte, in *opts.Generation), in *opts.Generation) SDSetResultStepCallback func(ctx unsafe.Pointer, callback func(num uint64, step uint64, imageData *byte, in *opts.Generation), in *opts.Generation) Text2Image func( sdCTX unsafe.Pointer, prompt, negPrompt string, clipSkip int, cfgScale, guidance float32, width, height int, sampleMethod int, sampleSteps int, seed int64, batchCount int, controlCond unsafe.Pointer, controlStrength, styleStrength float32, normalizeInput bool, inputIDImagesPath string, ) // contains filtered or unexported fields }
func NewCStableDiffusion ¶
func NewCStableDiffusion() (*CStableDiffusionImpl, error)
func (*CStableDiffusionImpl) Close ¶
func (c *CStableDiffusionImpl) Close()
func (*CStableDiffusionImpl) FreeSDContext ¶
func (c *CStableDiffusionImpl) FreeSDContext(ctx *CStableDiffusionCtx)
func (*CStableDiffusionImpl) NewSDContext ¶
func (c *CStableDiffusionImpl) NewSDContext(params *NewSDContextParams) *CStableDiffusionCtx
func (*CStableDiffusionImpl) SetLogCallBack ¶
func (c *CStableDiffusionImpl) SetLogCallBack()
type CUpScalerCtx ¶
type CUpScalerCtx struct {
// contains filtered or unexported fields
}
type Image ¶
func ImageToBytes ¶
type NewSDContextGoParams ¶
type NewSDContextGoParams struct { ModelPath *byte FluxModelPath *byte ClipLPath *byte T5xxlPath *byte VaePath *byte TaesdPath *byte ControlNetPath *byte LoraModelDir *byte EmbedDir *byte IDEmbedDir *byte VaeDecodeOnly bool FreeParamsImmediately bool KeepClipOnCPU bool KeepControlNetCPU bool KeepVAEOnCPU bool VaeTiling bool ShowDebug bool NThreads uint8 WType uint8 RngType uint8 Schedule uint8 }
type NewSDContextParams ¶
type NewSDContextParams struct { ModelPath string LoraModelDir string VaePath string NThreads uint8 WType opts.WType RngType opts.RNGType Schedule opts.Schedule FluxModelPath string ClipLPath string T5xxlPath string // newSDContextParamsSet TAESDPath string ControlNetPath string EmbedDir string IDEmbedDir string VaeDecodeOnly bool VaeTiling bool FreeParamsImmediately bool KeepClipOnCpu bool KeepControlNetCpu bool KeepVaeOnCpu bool }
Click to show internal directories.
Click to hide internal directories.