Objective
Correct your generated images with img2img for a better result
Environment
For this test I will use:
Stable Diffusion with Automatic1111 ( https://github.com/AUTOMATIC1111/stable-diffusion-webui )
To install Stable Diffusion check my article : https://civitai.com/articles/3725/stable-diffusion-with-automatic-a1111-how-to-install-and-run-on-your-computer
Model
Aniverse V2.0(HD) https://civitai.com/models/107842/aniverse
Image generation
Generate an image
In my case I want to make a girl running
Prompt
1woman running in the hill (face focus:1.2) with sportive clothes near
Negative prompt
blurry, blurry_image, Lowres, Low_resolution, Low_picture_quality, Low_picture_anime, extra_anatomy, extra_body, extra_navel, extra_face, extra_eyes, extra_chest, extra_nipples, extra_hips, extra_arms, extra_hands, extra_fingers, extra_legs, extra_feet, extra_toe, missing_anatomy, missing_body, missing_navel, missing_face, missing_eyes, missing_chest, missing_nipples, missing_hips, missing_arms, missing_hands, missing_fingers, missing_legs, missing_feet, missing_toe, sketch, sketching, (worst quality: 2), (low quality:2), ((monochrome)), ((grayscale)), inpainting, HDR, bad_prompt_version2, jpeg artifacts, signature, watermark, text, error, missing fingers,naked
Other Settings
Steps: 20
Sampler: Euler a
CFG scale: 7
Seed: 3467706712
Size: 1024x768
Model: aniverse_v20HDPruned
The result is not really nice (but it is ok for this demo).
Clic on the button "Send image and generation parameters to img2img inpaint tab."
On the img2img goes all the information of your image, if you press generate you will have a similar image.
On the top-right corner of the inpaint tab you can select the size of the pen
Now I can paint tha part of image that I don't like and I want to generate again.
Same seed
Attention if you seed is fixed with a value the image won't change a lot.
(I have a fixed seed in my demo)
The inpaint didn't work so well.. you can notice that the houses disappear, the tree is still there and also the face is quite the same.
Seed to -1 (random)
Now I set the seed to -1, for this demo I will do with a batch count of 4.
and run again.
The result are quite similar, there is still some influence of a green color where was the tree in the are. The face is a little bit different in each page.
The images until now had a "Denoising Strength" of 0,66.
if the value is near to 0 the image will be as much similar to the original
if the value is near to 1 the image will be generated as new.
Now let's do the same with a value of "Denoising strength" of 1.
Now the green color disappear, in one case there is a plan.
The face of the girl change a lot compared with before.
Let's select a picture that we like. and we send again to img2img.
I will put the new image on top of the previous one.. clic the "rubber" to remove the areas
Red clothes
Now I add a new area and change the prompt to
1woman running in the hill (face focus:1.2) with sportive red dress
Green clothes
prompt: 1woman running in the hill (face focus:1.2) with sportive green dress
Improve the face
Let's copy again the image
Clean all with the rubber button.
I will user Reactor (please che my article https://civitai.com/articles/3932/stable-diffusion-testing-reactor-face-swap-plug-in )
Reactor work during generation and also img2img.
I select an image that I want to use , I enable reactor and I keep all the other settings as they are.
I select the head and I run generate.
Now the girls is blonde.
I hope you enjoy my little tutorial, img2img is a powerful tool to reprocess all your images.
Remember that all the images generated are under.
\StableDiffusion\stable-diffusion-webui\outputs\img2img-images
In case you make a mistake you can recover a previous one and continue your changes.