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.
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
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
|