Skip to content

feat(mm): add gpt-image-2 as a starter model#9096

Open
Steve235lab wants to merge 4 commits intoinvoke-ai:mainfrom
Steve235lab:feat/add-gpt-image-2
Open

feat(mm): add gpt-image-2 as a starter model#9096
Steve235lab wants to merge 4 commits intoinvoke-ai:mainfrom
Steve235lab:feat/add-gpt-image-2

Conversation

@Steve235lab
Copy link
Copy Markdown

@Steve235lab Steve235lab commented Apr 30, 2026

Summary

  • Adds "gpt-image-2" to OpenAIProvider._GPT_IMAGE_MODELS so it uses the correct GPT Image request path (output_format, edits endpoint, etc.)
  • Adds openai_gpt_image_2 StarterModel entry with the same aspect ratios and panel schema as gpt-image-1; reuses all existing OPENAI_GPT_IMAGE_* constants
  • Adds a per-model timeout map (_MODEL_TIMEOUTS) with a 300 s timeout for gpt-image-2, which is significantly slower than other GPT Image models; all other models keep the existing 120 s default

Notable gpt-image-2 constraints (intentionally not exposed in the panel schema): transparent background is not supported, and input_fidelity is not configurable.

Test plan

  • openai_gpt_image_2 appears in the starter model list and can be installed via the Model Manager
  • txt2img generation succeeds with an OpenAI API key (or compatible proxy)
  • img2img / reference-image editing succeeds
  • Requests that exceed 120 s no longer time out (300 s budget)
  • Other GPT Image models (gpt-image-1, gpt-image-1.5, gpt-image-1-mini) are unaffected

Tested with existing test suite and manually on my self-deployed docker instance.

Adds OpenAI GPT-Image-2 to the external API model list.

- Registers "gpt-image-2" in OpenAIProvider._GPT_IMAGE_MODELS so it
  uses the correct GPT Image request/response path (output_format,
  edits endpoint, etc.)
- Adds openai_gpt_image_2 StarterModel entry with the same aspect
  ratios and panel schema as gpt-image-1

Notable gpt-image-2 constraints (handled by not exposing them in the
panel schema): no transparent background support, input_fidelity is
not configurable (always high fidelity).
gpt-image-2 is significantly slower than other GPT Image models,
especially through a proxy. The default 120s timeout causes failures.
Adds a per-model timeout map so other models are unaffected.
@github-actions github-actions Bot added python PRs that change python files backend PRs that change backend files services PRs that change app services labels Apr 30, 2026
@Pfannkuchensack Pfannkuchensack self-assigned this Apr 30, 2026
@Pfannkuchensack Pfannkuchensack removed their assignment May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend PRs that change backend files python PRs that change python files services PRs that change app services v6.13.x

Projects

Status: 6.13.x Theme: MODELS

Development

Successfully merging this pull request may close these issues.

3 participants