comfyctl

package
v0.0.0-...-88c3a73 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_PROGRESS         = "progress"
	TYPE_EXECUTION_CACHED = "execution_cached"
	TYPE_EXECUTION_START  = "execution_start"
	TYPE_EXECUTING        = "executing"
	TYPE_STATUS           = "status"
	TYPE_EXECUTED         = "executed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ComfyCtl

type ComfyCtl struct {
	ClientId string
	Host     string
	HttpCli  *http.Client
	// contains filtered or unexported fields
}

func New

func New(host, id string) *ComfyCtl

func NewWithPlainText

func NewWithPlainText(host, id string) *ComfyCtl

func (*ComfyCtl) Id

func (ctl *ComfyCtl) Id() string

func (*ComfyCtl) MakeWsUrl

func (ctl *ComfyCtl) MakeWsUrl() string

func (*ComfyCtl) QueuePrompt

func (ctl *ComfyCtl) QueuePrompt(workflowPath, outputPath, imagePath string, values map[string]interface{}, watch bool) ([]string, error)

func (*ComfyCtl) Watch

func (ctl *ComfyCtl) Watch(c *websocket.Conn, promptId string, cb ComfyExcutionCallback) error

type ComfyExcutionCallback

type ComfyExcutionCallback func(*ComfyResult)

type ComfyImage

type ComfyImage struct {
	Filename  string `json:"filename"`
	Subfolder string `json:"subfolder"`
	Type      string `json:"type"`
}

type ComfyMessage

type ComfyMessage struct {
	Type string                 `json:"type"`
	Data map[string]interface{} `json:"data"`
}

type ComfyResult

type ComfyResult struct {
	Type string              `json:"type"`
	Data *ComfySaveImageData `json:"data"`
}

type ComfySaveImageData

type ComfySaveImageData struct {
	Node   string                    `json:"node"`
	Output *ComfySaveImageNodeOutput `json:"output"`
}

type ComfySaveImageNodeOutput

type ComfySaveImageNodeOutput struct {
	Images   []*ComfyImage `json:"images"`
	PromptId string        `json:"prompt_id"`
}

type QueuePromptResp

type QueuePromptResp struct {
	PromptID   string                 `json:"prompt_id"`
	Number     int                    `json:"number"`
	NodeErrors map[string]interface{} `json:"node_errors"`
}

Jump to

Keyboard shortcuts

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