Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CancelPrompts(ctx context.Context, pids ...string) error
- func (c *Client) Close()
- func (c *Client) GetImage(ctx context.Context, ref ImageRef) (image.Image, error)
- func (c *Client) GetImageFile(ctx context.Context, ref ImageRef) (io.ReadCloser, error)
- func (c *Client) ID() string
- func (c *Client) ObjectsInfo(ctx context.Context) (classes.Classes, error)
- func (c *Client) ObjectsInfoRaw(ctx context.Context) (io.ReadCloser, error)
- func (c *Client) Prompt(ctx context.Context, prompt *apigraph.Graph, opts ...PromptOption) (*Prompt, error)
- func (c *Client) PromptJSON(ctx context.Context, prompt json.RawMessage, opts ...PromptOption) (*Prompt, error)
- func (c *Client) PromptResults(ctx context.Context, pid string) (Results, error)
- func (c *Client) RunPrompt(ctx context.Context, prompt *apigraph.Graph) (Results, error)
- func (c *Client) RunPromptJSON(ctx context.Context, prompt json.RawMessage) (Results, error)
- func (c *Client) StartPrompt(ctx context.Context, g *apigraph.Graph) (string, error)
- func (c *Client) StartPromptJSON(ctx context.Context, raw json.RawMessage) (string, error)
- func (c *Client) UploadImage(ctx context.Context, ref ImageRef, img image.Image, overwrite bool) (*ImageRef, error)
- func (c *Client) UploadImageFile(ctx context.Context, ref ImageRef, r io.Reader, overwrite bool) (*ImageRef, error)
- type ClientOption
- type CommonOption
- type Event
- type ExecCache
- type ExecDone
- type ExecStart
- type ImageRef
- type ImageType
- type NodeDone
- type NodeID
- type NodeProg
- type NodeResult
- type NodeStart
- type Prompt
- type PromptOption
- type Results
Constants ¶
View Source
const ( ImageInput = ImageType("input") ImageTemp = ImageType("temp") ImageOutput = ImageType("output") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelPrompts ¶
func (*Client) GetImageFile ¶
func (*Client) ObjectsInfo ¶
func (*Client) ObjectsInfoRaw ¶
func (*Client) PromptJSON ¶
func (c *Client) PromptJSON(ctx context.Context, prompt json.RawMessage, opts ...PromptOption) (*Prompt, error)
func (*Client) PromptResults ¶
func (*Client) RunPromptJSON ¶
func (*Client) StartPrompt ¶
func (*Client) StartPromptJSON ¶
func (*Client) UploadImage ¶
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
func WithHTTPClient ¶
func WithHTTPClient(cli *http.Client) ClientOption
func WithOnQueueSize ¶
func WithOnQueueSize(fnc func(queue int)) ClientOption
func WithWSDialer ¶
func WithWSDialer(dialer *websocket.Dialer) ClientOption
func WithoutWebsocket ¶
func WithoutWebsocket() ClientOption
type CommonOption ¶
type CommonOption interface { ClientOption }
func WithLog ¶
func WithLog(log *slog.Logger) CommonOption
type ImageRef ¶
type ImageRef struct { Filename string `json:"filename"` Subfolder string `json:"subfolder"` Type ImageType `json:"type"` }
func (ImageRef) AnnotatedPath ¶
AnnotatedPath returns annotated path that is accepted by ComfyUI image load nodes.
type NodeDone ¶
type NodeDone struct { Node NodeID NodeResult }
type NodeResult ¶
type NodeResult struct {
Images []ImageRef
}
type PromptOption ¶
type PromptOption interface {
// contains filtered or unexported methods
}
type Results ¶
type Results map[types.NodeID]NodeResult
Source Files ¶
Click to show internal directories.
Click to hide internal directories.