Skip to content

Latest commit

 

History

History
77 lines (58 loc) · 2.03 KB

README.md

File metadata and controls

77 lines (58 loc) · 2.03 KB

ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.

What it does

ComfyUI lets you design and execute advanced Stable Diffusion pipelines using a node-based graph interface. It supports a wide range of models including SD 1.5, SDXL, Flux, Hunyuan Video, Wan Video, LTX Video, Mochi, and more.

How to use

  1. Click Install to set up ComfyUI and its dependencies.
  2. Click Start to launch the server.
  3. Once started, click Open Web UI to open the ComfyUI interface in your browser.
  4. Use the Download Models menu to fetch checkpoints and LoRAs.
  5. Use the Download Mix menu to install model bundles for specific workflows (Wan Video, Hunyuan Video, LTX, Flux Tools, Mochi).
  6. Click Update to pull the latest ComfyUI code and dependencies.
  7. Click Reset to wipe the installation and start fresh.

API

ComfyUI exposes a REST API at http://127.0.0.1:<PORT> (the port is shown in the launcher after start).

Queue a prompt (POST /prompt)

JavaScript

const response = await fetch("http://127.0.0.1:8188/prompt", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    prompt: { /* your workflow JSON here */ },
    client_id: "my-client"
  })
})
const data = await response.json()
console.log(data.prompt_id)

Python

import requests, json

url = "http://127.0.0.1:8188/prompt"
payload = {
    "prompt": {},  # your workflow JSON here
    "client_id": "my-client"
}
response = requests.post(url, json=payload)
print(response.json())

cURL

curl -X POST http://127.0.0.1:8188/prompt \
  -H "Content-Type: application/json" \
  -d '{"prompt": {}, "client_id": "my-client"}'

Get queue status (GET /queue)

curl http://127.0.0.1:8188/queue

Get history (GET /history)

curl http://127.0.0.1:8188/history

Get available models (GET /object_info)

curl http://127.0.0.1:8188/object_info