Add image refinement flow to our image generation screens#292
Draft
dkotter wants to merge 12 commits intoWordPress:developfrom
Draft
Add image refinement flow to our image generation screens#292dkotter wants to merge 12 commits intoWordPress:developfrom
dkotter wants to merge 12 commits intoWordPress:developfrom
Conversation
…n passed, add that as a reference image before making our image generation request
…he image description
…mage for easier comparison. In that state, ensure refining further refines the refined image instead of the original. And ensure generating another image sends the original image along with the refinement prompt
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #292 +/- ##
=============================================
+ Coverage 57.72% 58.13% +0.40%
- Complexity 567 572 +5
=============================================
Files 36 36
Lines 2933 2952 +19
=============================================
+ Hits 1693 1716 +23
+ Misses 1240 1236 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… all styles into our stylesheet instead of inline. Minor adjustments to spacing and text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Image editing only works with the Google Provider and requires some changes to be released there first. You can manually copy those changes over to test (which is what I've done) but easiest to wait for those changes to be released.
What?
Closes #279
Partially closes #270
Add a "Refine" flow to our existing image generation screens
Why?
It's likely that an image you generate doesn't match exactly what you want the first time. While you can edit the prompt and try again, sometimes the image generated is pretty close and needs just a few refinements. This flow is now supported when generating images, both in the editor and directly in the Media Library.
How?
generate-imageAbility to support passing in areferencebase-64 encoded image. If that is passed, we add that as a file to our promptUse of AI Tools
Pulled my original code from #235 for most of this. Used GPT-5.3 Codex in Cursor to refine and fix a few things with manual review, testing and cleanup done by me
Testing Instructions
npm install && npm run buildMedia > Generate ImageScreenshots