Versions in this module Expand all Collapse all v0 v0.1.1 Mar 29, 2024 Changes in this version + func GetPngMetadata(r io.Reader) (map[string]string, error) + type ComfyClient struct + func NewComfyClient(server_address string, server_port int, callbacks *ComfyClientCallbacks, ...) *ComfyClient + func (c *ComfyClient) ClientID() string + func (c *ComfyClient) EraseHistory() error + func (c *ComfyClient) EraseHistoryItem(promptID string) error + func (c *ComfyClient) GetEmbeddings() ([]string, error) + func (c *ComfyClient) GetExtensions() ([]string, error) + func (c *ComfyClient) GetImage(image_data DataOutput) (*[]byte, error) + func (c *ComfyClient) GetObjectInfos() (*graphapi.NodeObjects, error) + func (c *ComfyClient) GetPromptHistoryByID() (map[string]PromptHistoryItem, error) + func (c *ComfyClient) GetPromptHistoryByIndex() ([]PromptHistoryItem, error) + func (c *ComfyClient) GetQueueExecutionInfo() (*QueueExecInfo, error) + func (c *ComfyClient) GetQueuedItem(prompt_id string) *QueueItem + func (c *ComfyClient) GetSystemStats() (*SystemStats, error) + func (c *ComfyClient) GetViewMetadata(folder string, file string) (string, error) + func (c *ComfyClient) Init() error + func (c *ComfyClient) Interrupt() error + func (c *ComfyClient) IsInitialized() bool + func (c *ComfyClient) NewGraphFromJsonFile(path string) (*graphapi.Graph, *[]string, error) + func (c *ComfyClient) NewGraphFromJsonReader(r io.Reader) (*graphapi.Graph, *[]string, error) + func (c *ComfyClient) NewGraphFromJsonString(path string) (*graphapi.Graph, *[]string, error) + func (c *ComfyClient) NewGraphFromPNGFile(path string) (*graphapi.Graph, *[]string, error) + func (c *ComfyClient) NewGraphFromPNGReader(r io.Reader) (*graphapi.Graph, *[]string, error) + func (c *ComfyClient) OnWindowSocketMessage(msg string) + func (c *ComfyClient) QueuePrompt(graph *graphapi.Graph) (*QueueItem, error) + func (c *ComfyClient) UploadFileFromPath(filePath string, overwrite bool, filetype ImageType, subfolder string, ...) (string, error) + func (c *ComfyClient) UploadFileFromReader(r io.Reader, filename string, overwrite bool, filetype ImageType, ...) (string, error) + func (c *ComfyClient) UploadImage(img image.Image, filename string, overwrite bool, filetype ImageType, ...) (string, error) + type ComfyClientCallbacks struct + ClientQueueCountChanged func(*ComfyClient, int) + QueuedItemDataAvailable func(*ComfyClient, *QueueItem, *PromptMessageData) + QueuedItemStarted func(*ComfyClient, *QueueItem) + QueuedItemStopped func(*ComfyClient, *QueueItem, QueuedItemStoppedReason) + type DataOutput struct + Filename string + Subfolder string + Text string + Type string + type GPU struct + Index int + Name string + Torch_VRAM_Free int64 + Torch_VRAM_Total int64 + Type string + VRAM_Free int64 + VRAM_Total int64 + type ImageType string + const InputImageType + const OutputImageType + const TempImageType + type PromptError struct + Details string + ExtraInfo map[string]interface{} + Message string + Type string + type PromptErrorMessage struct + Error PromptError + NodeErrors []interface{} + type PromptHistoryItem struct + Graph *graphapi.Graph + Index int + Outputs map[int][]DataOutput + PromptID string + type PromptMessage struct + Message interface{} + Type string + func (p *PromptMessage) ToPromptMessageData() *PromptMessageData + func (p *PromptMessage) ToPromptMessageExecuting() *PromptMessageExecuting + func (p *PromptMessage) ToPromptMessageProgress() *PromptMessageProgress + func (p *PromptMessage) ToPromptMessageQueued() *PromptMessageQueued + func (p *PromptMessage) ToPromptMessageStarted() *PromptMessageStarted + func (p *PromptMessage) ToPromptMessageStopped() *PromptMessageStopped + type PromptMessageData struct + Data map[string][]DataOutput + NodeID int + type PromptMessageExecuting struct + NodeID int + Title string + type PromptMessageProgress struct + Max int + Value int + type PromptMessageQueued struct + type PromptMessageStarted struct + PromptID string + type PromptMessageStopped struct + Exception *PromptMessageStoppedException + QueueItem *QueueItem + type PromptMessageStoppedException struct + ExceptionMessage string + ExceptionType string + NodeID int + NodeName string + NodeType string + Traceback []string + type QueueExecInfo struct + ExecInfo struct{ ... } + type QueueItem struct + Messages chan PromptMessage + NodeErrors map[string]interface{} + Number int + PromptID string + Workflow *graphapi.Graph + type QueuedItemStoppedReason string + const QueuedItemStoppedReasonError + const QueuedItemStoppedReasonFinished + const QueuedItemStoppedReasonInterrupted + type System struct + EmbeddedPython bool + OS string + PythonVersion string + type SystemStats struct + Devices []GPU + System System + type WSCallback interface + OnWindowSocketMessage func(string) + type WSMessageDataExecuted struct + Node int + Output map[string]*[]DataOutput + PromptID string + func (mde *WSMessageDataExecuted) UnmarshalJSON(b []byte) error + type WSMessageDataExecuting struct + Node *int + PromptID string + func (mde *WSMessageDataExecuting) UnmarshalJSON(b []byte) error + type WSMessageDataExecutionCached struct + Nodes []interface{} + PromptID string + type WSMessageDataExecutionStart struct + PromptID string + type WSMessageDataProgress struct + Max int + Value int + type WSMessageDataStatus struct + Status struct{ ... } + type WSMessageExecutionError struct + CurrentInputs map[string]interface{} + CurrentOutputs map[int]interface{} + ExceptionMessage string + ExceptionType string + Executed []string + Node string + NodeType string + PromptID string + Traceback []string + type WSMessageExecutionInterrupted struct + Executed []string + Node string + NodeType string + PromptID string + type WSStatusMessage struct + Data interface{} + Type string + func (sm *WSStatusMessage) UnmarshalJSON(b []byte) error + type WebSocketConnection struct + Callback WSCallback + Conn *websocket.Conn + ConnectionDone chan bool + IsConnected bool + MaxRetry int + RetryCount int + WebSocketURL string + func (w *WebSocketConnection) Close() error + func (w *WebSocketConnection) ConnectWithManager() error + func (w *WebSocketConnection) ConnectionManager() + func (w *WebSocketConnection) LockRead() + func (w *WebSocketConnection) UnlockRead()