Go-ComfyUI is a Go library for interacting with ComfyUI. It provides a set of Go templates and functions to generate JSON workflows for ComfyUI.
You can install the Go-ComfyUI library using go get:
Lastest version:
go get github.com/iguanesolutions/go-comfyui@latestSpecific version:
go get github.com/iguanesolutions/go-comfyui@v0.1.0Basic example:
package main
import (
"fmt"
"log"
"github.com/iguanesolutions/gocomfyui"
)
func main() {
params := gocomfyui.NewQwenImageGenParams(
gocomfyui.QwenImageGenPositivePrompt(`
A cyborg with black parts facing a wall and using a high power laser beam coming out of its eyes,
carving the text "HOPE" into the wall.
The carving is still hot, with molten sone dripping from the hollow carved out text.`),
)
prompt, err := gocomfyui.QwenImageGen(params)
if err != nil {
log.Fatal(err)
}
fmt.Println(string(prompt))
}In order to run the generated workflows you need to have the following ComfyUI custom nodes installed:
- ComfyUI_essentials
- ComfyUI-bleh
- ComfyUI-Custom-Scripts
- ComfyUI-Crystools >= 1.26.0
- comfyui-ig1-tools >= 3.1.0
- comfyui-openai-api >= 2.0.0
- comfyui_extra_api