Skip to content

yarcat/ai-dock-comfyui-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ai-dock-comfyui-go

A minimalistic Golang client for ai-dock/comfyui

TBD

Example

const (
  apiURL   = "https://.../.../api"
  apiToken = "..."
)
c := NewClient(apiURL)
c.APIToken = apiToken

resp := must(c.StartWorkflow(ctx, NewStartWorkflowRequest(prompt)))
id := resp.ID

for {
  time.Sleep(5 * time.Second)
  resp := must(c.WorkflowStatus(ctx, id))
  fmt.Println(resp.Status)
  for _, out := range resp.Output {
    fmt.Println(out.LocalPath)
    fmt.Println(out.GCP)
    fmt.Println()
  }
  if resp.Status == StatusSuccess {
    break
  }
}

About

A minimalistic Golang client for ai-dock/comfyui

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages