Add Init Image/Edit Image specific prompt and metadata for edit prompt#307
Add Init Image/Edit Image specific prompt and metadata for edit prompt#307aimerib wants to merge 3 commits intomcmonkeyprojects:masterfrom
Conversation
…edit image, but would work with init image as well. When a value is present in this prompt, the main prompt is ignored. This will also add `editprompt` to the list of metadata.
| null, OrderPriority: -5, Group: GroupInitImage, ChangeWeight: 2 | ||
| )); | ||
| EditPrompt = Register<string>(new("Edit Prompt", "Prompt to use specifically for editing images.\nThis will override the main prompt when generating edited images.", | ||
| "", OrderPriority: -4.9, Group: GroupInitImage, ViewType: ParamViewType.PROMPT |
There was a problem hiding this comment.
this needs either a toggleable or an ignoreif empty. It should probably also be advanced (the average person doesn't need this).
| AddStep(g => | ||
| { | ||
| g.FinalPrompt = g.CreateConditioning(g.UserInput.Get(T2IParamTypes.Prompt), g.FinalClip, g.UserInput.Get(T2IParamTypes.Model), true, "6"); | ||
| if (g.UserInput.TryGet(T2IParamTypes.EditPrompt, out string editPrompt) && !string.IsNullOrWhiteSpace(editPrompt)) |
There was a problem hiding this comment.
this if block shouldn't be duplicating the entire code inside, it's only changing one variable
|
It feels like it might be better here to just track the original prompt in metadata cleanly, rather than having a new parameter for edit prompt? When the init image was a generated image, copy the source prompt into metadata somewhere. |
|
Just wanted to say that I've been using this PR for a few days now, and it is really very handy to make quick edits without losing the initial prompt. I hope it will eventually be merged, as it is a great addition. |
|
Is there still hope this PR will be merged or adapted, please? This is a very interesting feature, to be able to do inpainting iterations while keeping the original prompt of the main generation. Thank you! 🙂 |
|
Closing for now as this has not been updated since 2024. Re-open if/when you want to continue. |
Adds a prompt box for init image params, specifically for using with edit image, but would work with init image as well. When a value is present in this prompt, the main prompt is ignored.
This will also add
editpromptto the list of metadata.This change is useful for when you have a long involved prompt as your main positive prompt, and you want to edit an image, but doesn't want to lose your prompt. This gives users a more ergonomic experience than both having a separate image2image tab AND having to replace your main prompt for every edit.
I suppose that this is sort of redundant if you are only doing img2img starting from a random picture dragged to the UI, but it is really useful when editing a generated image.
This was a pretty simple change, mostly to address #303 and my own needs. I'm more than open to discussing improvements or other approaches to this problem. I tested locally, and it seemed to work really well.