[GH-ISSUE #7767] [Feature]: Regenerate an image with an editable final prompt #4287

Closed
opened 2026-10-21 06:14:14 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @ylli-selmani on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7767

Originally assigned to: @ylli-selmani on GitHub.

What problem does this solve?

When a generated image comes out badly (wrong pose, broken hands, a character missing), the only way to get a new one is to swipe or regenerate the whole turn. That re-runs the text model and throws away a reply that was fine, just to re-roll one picture.

You also can't fix the prompt yourself. The lightbox shows the final prompt, but it's read-only, so even a one-word fix ("1girl" → "2girls") means a new turn and hoping the prompt writer gets it right this time.

#1573 asked for this before and was closed by #1743. That PR targeted the old refactor branch, so staging's gallery and lightbox still have no regenerate. It also only re-sent the plain prompt.

Proposed solution

A Regenerate image button in the image lightbox (next to Pin / Download / Close), so it works on message illustrations, selfies, storyboard frames and the chat gallery alike.

  • Clicking it turns the lightbox's Prompt panel into an editor with the final outgoing request: prompt, negative prompt, and on NovelAI V4+ one box per character prompt. You can edit any of them, or leave them and just re-roll.
  • Generate image re-sends it to the image connection that made the picture, with a picker to try another one. References (avatars) are rebuilt from the same sources at re-roll time. The request goes through the provider media queue like any other image.
  • The new image replaces the old one in the message. The old one stays in the chat gallery, so it can be pinned back.
  • To make this faithful, new chat images save the full request they were sent with (connection, negative prompt, character prompts, size, which reference sources were used). Today a gallery row only keeps the positive prompt, provider, model and size.
  • Images made before this change can still be re-rolled. They use the chat's current image connection, and the editor says plainly that the negative and character prompts weren't saved.

The character prompt boxes can also become editable in the existing "review prompts before sending" modal, where they are currently read-only.

The UX is borrowed from the Slurp app, which has "Regenerate image" with an editable final prompt for its own posts.

Alternatives considered

  • Image swipes (‹ 1/3 › arrows on the image itself): nicer, but it needs a new shape for message attachments. It's a good follow-up once regenerate exists.
  • Appending the new image next to the old one: simpler, but messages fill up with near-duplicates.
  • Re-rolling with only the saved positive prompt (what #1743 did): loses the negative prompt and NovelAI character captions, so multi-character scenes come back different for reasons the user can't see.
  • Storing exact copies of reference images per picture: perfectly faithful, but duplicates avatar data for every image.

Additional context

  • Related: #1573 / #1743 (earlier attempt on refactor), #7751 (illustrate commands now produce NovelAI character prompts, which this would save and expose).
  • I'll take this one.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @ylli-selmani on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7767 Originally assigned to: @ylli-selmani on GitHub. ## What problem does this solve? When a generated image comes out badly (wrong pose, broken hands, a character missing), the only way to get a new one is to swipe or regenerate the whole turn. That re-runs the text model and throws away a reply that was fine, just to re-roll one picture. You also can't fix the prompt yourself. The lightbox shows the final prompt, but it's read-only, so even a one-word fix ("1girl" → "2girls") means a new turn and hoping the prompt writer gets it right this time. #1573 asked for this before and was closed by #1743. That PR targeted the old `refactor` branch, so staging's gallery and lightbox still have no regenerate. It also only re-sent the plain prompt. ## Proposed solution A **Regenerate image** button in the image lightbox (next to Pin / Download / Close), so it works on message illustrations, selfies, storyboard frames and the chat gallery alike. - Clicking it turns the lightbox's **Prompt** panel into an editor with the final outgoing request: prompt, negative prompt, and on NovelAI V4+ one box per **character prompt**. You can edit any of them, or leave them and just re-roll. - **Generate image** re-sends it to the image connection that made the picture, with a picker to try another one. References (avatars) are rebuilt from the same sources at re-roll time. The request goes through the provider media queue like any other image. - The new image **replaces** the old one in the message. The old one stays in the chat gallery, so it can be pinned back. - To make this faithful, new chat images save the full request they were sent with (connection, negative prompt, character prompts, size, which reference sources were used). Today a gallery row only keeps the positive prompt, provider, model and size. - Images made before this change can still be re-rolled. They use the chat's current image connection, and the editor says plainly that the negative and character prompts weren't saved. The character prompt boxes can also become editable in the existing "review prompts before sending" modal, where they are currently read-only. The UX is borrowed from the Slurp app, which has "Regenerate image" with an editable final prompt for its own posts. ## Alternatives considered - **Image swipes** (‹ 1/3 › arrows on the image itself): nicer, but it needs a new shape for message attachments. It's a good follow-up once regenerate exists. - **Appending the new image next to the old one**: simpler, but messages fill up with near-duplicates. - **Re-rolling with only the saved positive prompt** (what #1743 did): loses the negative prompt and NovelAI character captions, so multi-character scenes come back different for reasons the user can't see. - **Storing exact copies of reference images per picture**: perfectly faithful, but duplicates avatar data for every image. ## Additional context - Related: #1573 / #1743 (earlier attempt on `refactor`), #7751 (illustrate commands now produce NovelAI character prompts, which this would save and expose). - I'll take this one. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4287
No description provided.