Versions in this module Expand all Collapse all v0 v0.3.1 Aug 28, 2026 Changes in this version + var HiresUpscalerMap = map[string]sd.SDHiresUpscaler + var LoraApplyModeMap = map[string]sd.LoraApplyMode + var PredictionMap = map[string]sd.Prediction + var PreviewMap = map[string]sd.Preview + var RNGTypeMap = map[string]sd.RngType + var SDTypeMap = map[string]sd.SDType + var SampleMethodMap = map[string]sd.SampleMethod + var SchedulerMap = map[string]sd.Scheduler + var VAEFormatMap = map[string]sd.SDVAEFormat + func Convert(inputPath, vaePath, outputPath, outputType, tensorTypeRules string, ...) error + func Load(libDir string) error + type ContextParams struct + AudioVAEPath string + AutoFit bool + Backend string + ClipGPath string + ClipLPath string + ClipVisionPath string + ControlNetPath string + DiffusionConvDirect bool + DiffusionFlashAttn bool + DiffusionModelPath string + EagerLoad bool + EmbeddingCount uint32 + Embeddings *Embedding + EmbeddingsConnectorsPath string + EnableMmap bool + FlashAttn bool + ForceSDXLVAConvScale bool + HighNoiseDiffusionModelPath string + IPAdapterPath string + KeepClipOnCPU bool + KeepControlNetOnCPU bool + KeepVAEOnCPU bool + LLMPath string + LLMVisionPath string + LoraApplyMode string + MaxVRAM string + ModelArgs string + ModelPath string + MotionModulePath string + NThreads int32 + OffloadParamsToCPU bool + ParamsBackend string + PhotoMakerPath string + Prediction string + PulidWeightsPath string + RNGType string + RPCServers string + SamplerRNGType string + SplitMode string + StreamLayers bool + T5XXLPath string + TAEPreviewOnly bool + TAESDPath string + TensorTypeRules string + UncondDiffusionModelPath string + VAEConvDirect bool + VAEFormat string + VAEPath string + WType string + type Embedding struct + Name string + Path string + type ImgGenParams struct + AutoResizeRefImage bool + BatchCount int32 + CacheParams sd.SDCacheParams + CfgScale float32 + CircularX bool + CircularY bool + ClipSkip int32 + ControlImagePath string + ControlStrength float32 + CustomSigmas []float32 + DistilledGuidance float32 + Eta float32 + ExtraSampleArgs string + FlowShift float32 + Height int32 + HiresCustomSigmas []float32 + HiresDenoisingStrength float32 + HiresEnabled bool + HiresModelPath string + HiresScale float32 + HiresSteps int32 + HiresTargetHeight int32 + HiresTargetWidth int32 + HiresUpscaleTileSize int32 + HiresUpscaler string + ImageCfgScale float32 + IncreaseRefIndex bool + InitImagePath string + LoraCount uint32 + Loras *Lora + MaskImagePath string + NegativePrompt string + PMParams *PMParams + Prompt string + RefImageArgs string + RefImagesCount int32 + RefImagesPath []string + SampleMethod string + SampleSteps int32 + Scheduler string + Seed int64 + ShiftedTimestep int32 + SkipLayerEnd float32 + SkipLayerStart float32 + SkipLayers []int32 + SlgScale float32 + Strength float32 + VAETilingParams sd.SDTilingParams + Width int32 + type Lora struct + IsHighNoise bool + Multiplier float32 + Path string + type PMParams struct + IDEmbedPath string + IDImages *sd.SDImage + IDImagesCount int32 + StyleStrength float32 + type StableDiffusion struct + func NewStableDiffusion(ctxParams *ContextParams) (*StableDiffusion, error) + func (sDiffusion *StableDiffusion) Free() + func (sDiffusion *StableDiffusion) GenerateImage(imgGenParams *ImgGenParams, newImagePath string) error + func (sDiffusion *StableDiffusion) GenerateVideo(vidGenParams *VidGenParams, newVideoPath string) error + type Upscaler struct + func NewUpscaler(params *UpscalerParams) *Upscaler + func (us *Upscaler) Upscale(inputImagePath string, upscaleFactor uint32, outputImagePath string) error + type UpscalerParams struct + Backend string + Direct bool + EsrganPath string + NThreads int + OffloadParamsToCPU bool + ParamsBackend string + TileSize int + type VidGenParams struct + CacheParams sd.SDCacheParams + CfgScale float32 + CircularX bool + CircularY bool + ClipSkip int32 + ControlFramesPath []string + ControlFramesSize int32 + CustomSigmas []float32 + DistilledGuidance float32 + EndImagePath string + Eta float32 + FlowShift float32 + Height int32 + HighNoiseCfgScale float32 + HighNoiseCustomSigmas []float32 + HighNoiseDistilledGuidance float32 + HighNoiseEta float32 + HighNoiseFlowShift float32 + HighNoiseImageCfgScale float32 + HighNoiseSampleMethod string + HighNoiseSampleSteps int32 + HighNoiseScheduler string + HighNoiseShiftedTimestep int32 + HighNoiseSkipLayerEnd float32 + HighNoiseSkipLayerStart float32 + HighNoiseSkipLayers []int32 + HighNoiseSlgScale float32 + ImageCfgScale float32 + InitImagePath string + LoraCount uint32 + Loras *Lora + MOEBoundary float32 + NegativePrompt string + Prompt string + SampleMethod string + SampleSteps int32 + Scheduler string + Seed int64 + ShiftedTimestep int32 + SkipLayerEnd float32 + SkipLayerStart float32 + SkipLayers []int32 + SlgScale float32 + Strength float32 + VaceStrength float32 + VideoFrames int32 + Width int32