feat: initial public release of ComfyUI-Imagent

BYOK OpenAI gpt-image generation and editing nodes for ComfyUI — calls go
directly to the OpenAI API with your own key (no proxy, no credit markup).

- Two nodes: "Imagent: OpenAI Image" (text-to-image) and "Imagent: OpenAI
  Image Edit" (edit / inpaint / multi-reference compose).
- Models gpt-image-2 / gpt-image-1.5 / gpt-image-1 with a per-model dynamic UI
  (comfy_api DynamicCombo): size, background, custom WxH, and input_fidelity
  are revealed only for the models that support them.
- Edit node accepts an auto-growing set of reference images (up to 16) plus an
  optional inpaint mask; generate supports batches up to 8.
- API key via OPENAI_API_KEY or a local config.json.

Requires ComfyUI >= 0.23.0.
This commit is contained in:
Alexander Garzon
2026-06-08 09:39:21 -04:00
commit 6d3d2fca46
29 changed files with 1707 additions and 0 deletions
+63
View File
@@ -0,0 +1,63 @@
name: Publish to ComfyUI Registry
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Existing tag whose changelog to (re)sync, e.g. v0.1.0 (skips re-publish)"
required: true
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
env:
COMFY_API_KEY: ${{ secrets.COMFY_API_KEY }}
PUBLISHER_ID: agarzon
NODE_ID: comfyui-imagent
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref_name }}
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Publish to ComfyUI Registry
if: github.event_name == 'push' && env.COMFY_API_KEY != ''
run: |
pip install comfy-cli
comfy node publish --token "$COMFY_API_KEY"
- name: Sync version changelog to the Registry
if: env.COMFY_API_KEY != ''
env:
TAG_INPUT: ${{ github.event.inputs.tag }}
run: |
TAG="${TAG_INPUT:-$GITHUB_REF_NAME}"
v="${TAG#v}"
awk -v v="$v" '
$0 ~ "^## v?" v " " { f=1; next }
f && /^## / { exit }
f { print }
' CHANGELOG.md > changelog.md
if [ ! -s changelog.md ]; then
echo "No CHANGELOG section found for $v" >&2
exit 1
fi
body=$(jq -Rs '{changelog: ., deprecated: false}' < changelog.md)
code=$(curl -sS -o resp.json -w '%{http_code}' -X PUT \
"https://api.comfy.org/publishers/$PUBLISHER_ID/nodes/$NODE_ID/versions/$v" \
-H "Authorization: Bearer $COMFY_API_KEY" \
-H "Content-Type: application/json" \
-d "$body")
echo "HTTP $code"; cat resp.json; echo
case "$code" in
2*) echo "Changelog synced for $v" ;;
*) echo "Failed to sync changelog (HTTP $code)" >&2; exit 1 ;;
esac
+45
View File
@@ -0,0 +1,45 @@
name: Release
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Existing tag to (re)release, e.g. v0.1.0"
required: true
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Resolve tag and extract its CHANGELOG section
id: notes
env:
TAG_INPUT: ${{ github.event.inputs.tag }}
run: |
TAG="${TAG_INPUT:-$GITHUB_REF_NAME}"
v="${TAG#v}"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
awk -v v="$v" '
$0 ~ "^## v?" v " " { f=1; next }
f && /^## / { exit }
f { print }
' CHANGELOG.md > release-notes.md
if [ ! -s release-notes.md ]; then
echo "No CHANGELOG section found for $v" >&2
exit 1
fi
cat release-notes.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ steps.notes.outputs.tag }}
name: ${{ steps.notes.outputs.tag }}
body_path: release-notes.md