stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Add inpaint arguments and json format in .txt file
Description
Issue:
While working and reproduce images generated using img2img inpaint tab, there are options that are not exported After try to generate the same images the options:
- inpaint_full_res_padding
- inpaint_full_res
- inpaint_mask_invert
- inpainting_mask_invert
- inpainting_fill
Also since i am adding more field to the generated .txt file, to improve the visibility of the options i added a new config parameter to export the file in json format
Solution:
- Add missing options to inpainting images generated
- Add new options to export .txt files in json format
Screenshots/videos:
UI functionality
Normal output
JSON output
Ruff
Tests
Checklist:
- [x] I have read contributing wiki page
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines
- [x] My code passes tests
@AUTOMATIC1111 may you kindly review?
This PR has multiple unrelated things:
- adding missing infotext fields for img2img: this is welcome, but see below.
- adding an option to write infotext as json: I do not want multiple formats for infotext, so this change will not make it in.
Now, when adding infotext fields, you need both code to add them, and to read from them. You only have former.
The preferred way to add infotext fields it to use p.extra_generation_params
dictionary, and not inside create_infotext
function, but rather where they are used, i.e. in StableDiffusionProcessingImg2Img.__init__
.
The other thing that needs to be done and isn't, is to add support for reading those fields into UI. See, for example, how mask_blur
component does it.
Thanks for the comment, i will take a look