Documentation
¶
Overview ¶
Package flux implements engine.Engine for Black Forest Labs FLUX API.
Image generation is async: POST /v1/{model} creates a task, then GET /v1/get_result?id={id} polls for completion. Auth: X-Key: {key}, env BFL_API_KEY.
Index ¶
Constants ¶
View Source
const ( ModelProUltra = "flux-pro-1.1-ultra" ModelPro11 = "flux-pro-1.1" ModelPro = "flux-pro" ModelDev = "flux-dev" )
Model constants.
Variables ¶
View Source
var (
ErrMissingPrompt = errors.New("flux: missing prompt in workflow graph")
)
Functions ¶
func ConfigSchema ¶
func ConfigSchema() []engine.ConfigField
ConfigSchema returns the configuration fields required by the FLUX engine.
func DefaultProvider ¶ added in v0.15.0
DefaultProvider returns preset engine configurations for flux.
func ModelInfos ¶ added in v0.16.0
ModelInfos returns i18n metadata for all FLUX models.
func ModelsByCapability ¶
ModelsByCapability returns all known FLUX models grouped by capability.
Types ¶
type Config ¶
type Config struct {
APIKey string
BaseURL string
Model string
HTTPClient *http.Client
WaitForCompletion bool
PollInterval time.Duration
OnProgress epoll.OnProgress
}
Config configures the FLUX engine.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine implements engine.Engine for FLUX.
func (*Engine) Capabilities ¶
func (e *Engine) Capabilities() engine.Capability
Capabilities implements engine.Describer.
Click to show internal directories.
Click to hide internal directories.