SwarmUI icon indicating copy to clipboard operation
SwarmUI copied to clipboard

Add Init Image/Edit Image specific prompt and metadata for edit prompt

Open aimerib opened this issue 1 year ago • 2 comments

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 editprompt to 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 https://github.com/mcmonkeyprojects/SwarmUI/issues/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.

aimerib avatar Oct 05 '24 20:10 aimerib

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. Not really sure.

mcmonkey4eva avatar Oct 06 '24 01:10 mcmonkey4eva

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.

Michoko92 avatar Oct 13 '24 09:10 Michoko92

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! 🙂

Michoko92 avatar Feb 28 '25 15:02 Michoko92

Closing for now as this has not been updated since 2024. Re-open if/when you want to continue.

mcmonkey4eva avatar Mar 31 '25 05:03 mcmonkey4eva