diffusers

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the backend name.
	Name = "diffusers"
)

Variables

View Source
var (
	ErrNotImplemented    = errors.New("not implemented")
	ErrDiffusersNotFound = errors.New("diffusers package not installed")
	ErrPythonNotFound    = errors.New("python3 not found in PATH")
	ErrNoDDUFFile        = errors.New("no DDUF file found in model bundle")
)

Functions

func ExtractPythonError

func ExtractPythonError(output string) string

ExtractPythonError attempts to extract a meaningful error message from Python output. It looks for common error patterns and returns a cleaner, more user-friendly message. If no recognizable pattern is found, it returns the original output.

func New

func New(log logging.Logger, modelManager *models.Manager, serverLog logging.Logger, conf *Config, customPythonPath string) (inference.Backend, error)

New creates a new diffusers-based backend for image generation. customPythonPath is an optional path to a custom python3 binary; if empty, the default path is used.

Types

type Config

type Config struct {
	// Args are the base arguments that are always included.
	Args []string
}

Config is the configuration for the diffusers backend.

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig creates a new Config with default values.

func (*Config) GetArgs

func (c *Config) GetArgs(model string, socket string, mode inference.BackendMode, config *inference.BackendConfiguration) ([]string, error)

GetArgs implements BackendConfig.GetArgs for the diffusers backend.

Jump to

Keyboard shortcuts

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