Workflow text2img img2img installing A1111 for inpainting (or just AI image gen)

KofiLaces

Lurker
Joined
Jun 22, 2026
Posts
26
Reaction score
0
Since I keep being asked and the last thread got deleted I thought Id repost how I do AI images using A1111 using stable diffusion models. This for me was how I got started, I thought it was a simple and easy way to get going, I had a gtx 1080 and ive since got a new 4070 TI Super so 8gb vram or more is ideal, obviously the less you have the slower it will be.

1. Stable Diffusion Portable

Download Stable Diffusion Portable ( https://github.com/serpotapov/stable-diffusion-portable/archive/refs/heads/main.zip )
Unzip the stable-diffusion-portable-main folder anywhere you want (Root directory preferred)
Example: D:\stable-diffusion-portable-main
Run webui-user-first-run.cmd and wait for a couple seconds (installs specific components, etc)
It will automatically launch the webui, but since you don't have any models, it's not very useful. Follow the guide further.
To relaunch the webui in the project root, run webui-user.bat

2. The WEBUI!

Wait until you see

Code:

Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.

Then go to ( http://localhost:7860/ ) in any browser.

3. Models

For model downloads, once downloaded you will need to install them by moving the save file into your stable diffusion folder, for me its " stable-diffusion-portable-main\models\Stable-diffusion "
installing Lora's will be the same route but obviously the lora folder " stable-diffusion-portable-main\models\Lora "

For inpainting images, the best models are (they are 18+ so you will need to create a free account):

Realistic Vision InPainting
Go to ( https://civitai.com/models/4201/realistic-vision-v13 )

Uber Realistic Porn Merge inpainting
Go to ( https://civitai.com/models/2661?modelVersionId=915981 )

epiCRealism inpainting
Go to ( https://civitai.com/models/25694?modelVersionId=134361 )

PLEASE NOTE: if you see another that you like please make sure it is inpainting and not just a checkpoint (it should say in the title), checkpoints are for image generation not inpainting so they will not work.

4. Loading Model

In the webui, at the top left, "Stable Diffusion checkpoint", hit the 'Refresh' icon.
Now you should see the Realistic Vision or any other downloaded model in the list, select it.

5. Model Parameters, prompts and loras

Go to the "img2img" tab under "Stable Diffusion checkpoint" top left. Under the textarea prompts you should see more tabs, click on inpainting then select your image by dragging it into the box or clicking to upload it.

. In the first text area (positive prompt), enter the things you want to see.

Examples:

" RAW photo of a nude woman, naked "

or more detailed example

" RAW photo of a nude woman, naked, natural skin texture, hyperrealism, ultra detailed, best quality, masterpiece, intricate details hyperrealistic, (masterpiece, best quality) "

( higher priority than prompts without ) (( even higher )) (((( Maxed out priority ))))

. In the second text area (negative prompt), enter the things you don't want to see.

((clothing)), (monochrome:1.3), (deformed, distorted, disfigured:1.3), (hair), jeans, tattoo, wet, water, clothing, shadow, 3d render, cartoon, ((blurry)), duplicate, ((duplicate body parts)), (disfigured), (poorly drawn), ((missing limbs)), logo, signature, text, words, low res, boring, artifacts, bad art, gross, ugly, poor quality, low quality, poorly drawn, bad anatomy, wrong anatomy

or

body out of frame, ((deformed)), ((cross-eyed)), ((((closed eyes)))), blurry, out of focus, unfocused, (bad anatomy), disfigured, mutant, (mutation), (mutated), (extra limbs), extra arm, (bad body), broken, (back), behind, lazy eye, ((lazy eyes)), beard, man, ((closeup)), ((close-up)), barbie, doll, (penis), dick, balls, testicles, moustache, mustache, black and white, greyscale, sepia, B&W, highlights, cut off, (cropped), (((hairy chest))), filters, portrait, overexposed, over-exposed, (makeup), stretched, stretch, wide, extra wide, amputee, amputated, missing, haze, disformed, bad proportions, plastic, lopsided breasts, blur, weird, odd, hiding, alien abnormal, fused, blending, missing teeth, missing tooth, toothless, no teeth, backward, poor detail, low detail, extra nipples, (((deformed breast))), cgi, airbrush, unequal boob size, oversized vagina

These are just examples, you can download and install loras and add their trigger prompts to activate the loras in both prompt and negative prompts

EXAMPLE: for smaller breasts download a lora (make sure it's base model is SD1.5. That's what model version the inpainting I suggested are all using)

" https://civitai.com/models/25727/jk-small-breasts-lite " download and save into your lora folder (stable-diffusion-portable-main\models\Lora)

Find your lora tab, the tab line with generation, textual, hypernetworks, checkpoints tab under prompts it should be the last one, refresh if its not showing. Click the lora and it should add to your prompt " " the triggers to activate this lora is shown on the right under the download button on the civitai site " flat_chest, tiny_breasts ", adding the triggers to your prompt should activate the lora.

The end line of the lora " :1> " indicates the strength of the lora sometimes this can mess with a generation and create messed up errors in images. lower the strength if any of this happens :0.1 to :1 is positive and you can go into negative as well :-0.1 :-1, for example there are loras the choose how big something is based on the strength number hat size :-0.8 would be a tiny hat with :0.5 being bigger, some loras let you go above :1 to make things even bigger so :1.4 would be even bigger.

6. Sampling Methods

see " https://stable-diffusion-art.com/samplers/ " for greater detail.
Each method has different results for render speed and quality.

Here are my recommendations:

1. If you want to use something fast, converging, new, and with decent quality, excellent choices are
DPM++ 2M or DPM++ 3M SDE with minimum 25 steps, the more steps you add the slower your gen will be.

2. If you want good quality images and don’t care about convergence, good choices are
DPM++ SDE with 25+ steps (Note: This is a slower sampler)
DDIM with 25+ steps.

3. Avoid using any ancestral samplers if you prefer stable, reproducible images (Euler A, DPM2 A, DPM++ 25A and so on).

4. Euler and Heun are fine choices if you prefer something simple. Reduce the number of steps for Heun to save time.

7. Sampling steps.

select 25 above, the more steps the more detail but longer time to render, personally I use around 25-50, 50-150 takes longer and the results are not that much different for the time it takes.

8. Width and Height

512 x 512 for square, 512 x 768 for portrait, 768 x 512 for landscape.
the render will prefer smaller numbers, doubling it will create more errors in the image. For example 1024 x 1024 Stable Diffusion will be trying to render 2 images at 512 x 512 so the closer to 512 you are the less random artifacts / errors you will get.

This being said you can push closer to the errors, get slightly more detail sometimes more errors but good result, example size I use regularly 704 x 960 for landscape or 960 x 704 for portrait
 
Once you have it all downloaded and installed you can also start to create your own images not just inpainting. You can do Text2IMG, type out what you want using the models from civitai (make sure you download the checkpoint models that are not inpainting to do Text2IMG. Then there is another step you can take which is training your own models to use your face instead, it only takes about 15 images that are 500x500 using this tutorial I found on youtube that uses google colab to train models
 
I dont think so, the best thing to do would be use a still image from the video and edit it with inpainting and put it through video gen, OR just take a still and put it through video.
 
Use a lora from civitia, there should be a few cum shot loras, make sure its SD 1.5 unless you are using SDXL
 
What do you suggest for an M1 Pro mac 8bg ram. I’n new and don’t know much but I’ll like text to picture and picture to picture
 
No idea. Its all built around nvidia cards and cuda cores, AMD gpus struggle and need work arounds to use a lot of image gen stuff. There is a program thats free that does local hosting called pinokio, its like a market place for AI programs, there is comfy ui on there but no idea if it would work with apple. Comfy UI is a steep learning curve compared to A11111 but if it runs I'd say learn how to use comfy ui, its harder, more complex but the results are far better and you can do so much more with comfy ui, A11111 is just a simple plain image gen
 
Sorry if its a rather stupid question, but is this entire workflow completely local? - i've read through and from my understanding the WebUI is just an interface for you to control things with the model/ images? its just that you have to open it in a browser?

and with the sampling, i've read through the link you attached, from my understanding:

sampling is just removing noise from an image until a realistic/ desirable image is produced? which is part of the stable diffusion model process
so sampling applied to inpainting and stable diffusion would mean,
a generated image of the person, which constantly goes through noise removal, until properly inpainted/removed/edited clothing/ matches whatever prompt is provided

greater steps = more detail as more noise is removed? - if my understanding here is right, is it just a case of playing with the number of steps until a desirable image is made? (for my application the desired product is a realistic image)

adding in convergence, which in dependent on the sampler used - from my understanding,
convergence is essentially, with each image being denoised, the image largely stays the same (same position/ shape)

non-converging looks a bit more realistic from the example they provide, but in the case of inpainting an image of someone, i presume the whole body position/ shape will change if you go for a non-converging look, but it could be more realistic?
convergence keeps the image largely similar but can lack quality?

here you say option 2 doesn't have convergence, then you talk about ancestral samplers having no reproducibility, surely option 2 also has no reproducibility due to it's non convergence? for option 2, does it produce an inpainted image which is largely the same as the original un-inpainted image?

finally:
the image sizing, this is in regards to the final image right? you have to keep it low res for accuracy purposes. How would one re-scale the image to its original sizing, upscalers will remove detail, are there any work-arounds to this step?

sorry for the bombardment of questions/ text,
Thanks a lot for the tutorial - unfortunately lost an earlier tutorial in the great extermination
 
yes its just a UI that runs on a browser, you can unplug everything have 0 connection to the internet and it all works.

Depends on what the model (checkpoint) you are using for the in painting, check what their "target steps" are, early models used to aim for as low steps as possible meaning more efficient, better results less time rendering. So sometimes adding more steps to a image does the opposite the AI will hit the target ideal steps then just sort of go through a cycle of ok ive hit 25 steps, they have asked for 150 so lets put the image through rending another 5 times, thats bad because AI is stupid, it wont think oh lets make it better it just does the process again and again and does "AI dreaming" so your results will end up crazy looking, artifacts, look like CG compared to the photo of the image you are inpainting.
I just copy pasted the install instructions for people, ive messed around with AI image gen for a for years now, not sure what convergence is haha so my simple head understanding is with inpainting its very hit and miss, relies on good models or loras to help cover up not great quality results. I would say that steps, de-noise, CFG and stuff is far more important with text to image gen than inpainting. That being said when I messed around with in painting I found that realistic results sometimes came from having slight noise in the image and then using some low steps around 25-50.

No image size is what the model will try and render at. So example, I can have a 1080 x 1080 image, I paint the bits I want to change, the model I load is a SD1.5 based model, SD1.5 models are trained with 512 x 512 image, you can push this to image render sizes like 762 x 960 (if its portrait) asking anything more of it it doubles the result because you are going over the original 512x512 training, so you will get more errors like 4 arms 4 legs 2 heads because you requested 1080x1080 it does the 512x512 pass once and sees you requested 1080x1080 so goes around again with another render.
 
if you want my honest opinion inpainting is shit haha. It can be ok if there is 1 image you really want to change. But I found much better results training models on images, doing text 2 image gen, upscaling, able to use more custom loras that change the models and renders like realistic body changes, hair style or colour changes, Clothes and lighting. Its just a hell of a lot easier and better results.
 
I already posted the info I used. Its honestly easier to watch and follow that video, there are ways of doing it locally but I was hitting a wall because of my set up at the time. Advice to help train the models from what Ive found that using the 15 images to train the model have a wide range of lighting on the image (if you can), make sure as much of the face is visible, you want all hair/top of head visible, with below you want at least the neck visible if possible shoulders. standard portrait basically. You want 1-2 of the images maybe showing a bit more of the body, not legs just torso and head, but always include the face, it struggles with some glasses but its easy to add glasses in renders with loras after. Dont use 15 images where they are all the same lighting and facial expression it will limit your results.

I tried making a model with just 1 image, I took that 1 image and ran it through image 2 video using WAN2.2, made a couple 6 second videos, where I changed lighting, changed angles, changed facial expressions, changed clothes. Screen shotted them, used some AI upscaling on some just to clear out some fuzz. I ended up with 15 512x512 images to train a model and it worked.
 
Also to add, I am using comfy ui as my main way to make, edit images now. It feels so much better. Its fully worth learning, you can do a lot more with it and im still learning but it looks like you can do video, audio both at the same time, image edit, image gen, image to image, text to image
 
the way I got it and started to learn was using pinokio, used the get started templates. I just googled anything I got stuck on, a lot of the youtube tutorials are either out of date or have add ons installed and dont tell you about them and just use them in the video and expect you to know what it is and how to get it. Even using AI like grok, claude and chat gpt to explain workflows. I have set up now text 2 img, img 2 vid, img 2 img, text 2 image SDXL, text 2 image with upscale and just a upscale. It looks more intimidating than it is, a lot of the massive complex workflows you see online are people just fine tuning a lot ive found.
 
Back
Top