- Issue created by @andywaldrop
- 🇰🇬Kyrgyzstan dan_metille
I was going to make the same request. Here is a patch which add support for OpenAI's GPT Image 1 model for Text to Image operations:
1. Model configuration for GPT Image 1 with proper settings:
- Quality options (low/medium/high)
- Size options (multiple aspect ratios supported)
- Output format options (png/jpeg/webp)2. Parameter handling adapted for GPT Image 1's API requirements:
- Removes unsupported parameters (like 'style')
- Uses 'output_format' instead of 'response_format'
- Only passes parameters that are compatible with this model3. Response processing that handles GPT Image 1's different response format:
- Detects GPT Image 1 responses
- Sets correct MIME types based on output format
- Error handling with recovery mechanisms4. Model detection updated to recognize GPT Image 1 models in the API response
User Interface Changes:
- Adds GPT Image 1 as a model option in the Text to Image model selection dropdown
- Maintains DALL-E 3 as the default option, as GPT Image 1 requires organization verification and is more expensiveImportant Note
Organization Verification Required: The GPT Image 1 model requires a verified OpenAI organization account. Users will need to verify their organization at https://platform.openai.com/settings/organization/general before they can use this model. Verification may take up to 15 minutes to propagate after completion.
The patch includes improved error handling to gracefully manage API rejections when using GPT Image 1 without proper verification, but ideally users should be informed of this requirement before attempting to use the model. - First commit to issue fork.
- @anjaliprasannan opened merge request.
- 🇮🇳India anjaliprasannan
Converted the patch to MR,
Reviewed the changes and it works well for me. adding before and after patch screenshots.
Moving to RTBC - 🇩🇪Germany marcus_johansson
Thank @anjaliprasannan - I added some comments on things that probably can be fixed.
- 🇮🇳India anjaliprasannan
@marcus_johansson I have modified the code now, can you review it?
- 🇩🇪Germany marcus_johansson
@anjaliprasannan - looks much better! I just added one comment, after you fixed that I'll go ahead and merge.
- 🇩🇪Germany marcus_johansson
Thanks @anjaliprasannan, I made one change to remove duplicated code and merged it.
-
marcus_johansson →
committed f0eb3283 on 1.1.x authored by
anjaliprasannan →
Issue #3522213: Add support for GPT Image 1 model
-
marcus_johansson →
committed f0eb3283 on 1.1.x authored by
anjaliprasannan →
Automatically closed - issue fixed for 2 weeks with no activity.