vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.41k stars 390 forks source link

[Feature]: Create a button that can be clicked anytime that transferts the img2img parameters into a txt file #2067

Closed StableInfo closed 11 months ago

StableInfo commented 11 months ago

Feature description

I have already expressed my desire to have better img2img parameters saving text file here: https://github.com/vladmandic/automatic/issues/1442 Today I am coming out with a new solution. image First of all, we will need a field above the input image, this field is filled automatically with the name of the input image, if the filling fails then the user can fill it himself if he wants to. (its the red bordered box with a black text inside it). The box can be static (user cannot modify its value) if thats too complicated.

Then, Instead of multipling parameters info in the text files generated when you check the button "Create text file next to every image with generation parameters", instead give the user the option to create an extra file, whenever he feels it, whenever he feels the image was so great that he needs to save every bit of info available. The user will be able to press the red bordered white button that can be found either on the lower right corner of the image uploaded above, or on the right corner of the input image (of the UI).

The button will create a "state" of the img2img tab, with everything, every parameter selected and every value chosen, including the value of the box contaning name of the image. If possible, and this is the most interesting, this new text file will be able to retrieve the data from the PAST generation (t-1), the ones displayed under the output image in the UI. (prompt, seed etc), we only need the SEED though. The final result will be like this: image

Version Platform Description

No response

Symbiomatrix commented 11 months ago

Practical solution - why not just tick the "create a text file" checkbox, so that a full history is always available for you permanently, without having to fiddle with the ui? These text files take up virtually no space so there's no real downside. Alternatively, I could see this as a more practical feature request on zyin's config presets, in the form of a setting to auto save the last k runs as presets named lastrun1:k. That way one may actually revert to the prior state with ease. As far as the main repo is concerned, this sounds to me like a relatively useless button.

Also, note that there no such thing as the "name of the image used as input for img2img", to my knowledge - the image you upload to the i2i component is converted to a base64 string and that's what is passed the rest of the way (or converted with pillow, it's been a while since I experimented with outpainting). There is no local file reference. At best, the raw image could be stored like we do in regional prompter's mask presets.

Edit: On second thought, it might be a difficult addition to zyin's, since the save is entirely sidelined currently and not part of processing; would have grab the values from whatever format they're passed around as, rather than a button merely receiving the values directly as input components.

StableInfo commented 11 months ago

Hello @Symbiomatrix , Yeah Vlad said to me that the image is passed as X form which makes the info about the name of the file or its metadata being lost. I already use the create a text file, if you re read my post you will realize that I tried to explain that we need an EXTRA text file that would contain the txt2info extra parameters, mainly the name of the input files.

Isnt there a way to get the info about the image input used? There must be a way. We must find it.