Sign In

A guide to newbie inpainting

16
A guide to newbie inpainting

WHAT IS THIS? Insert bad meme here

What even is inpainting? All I know is that its pretty complicated and it took me way longer to understand how to even do it. Ill help you newbies to at the very least get started. So first things first. The mask blur should normally be at 4. Higher mask blur values will make the AI try to implement your mask kind of. But normally most people should just leave it at 4 to start. Next mask content or mask type. Fill just only tries to add the object. Lets say you want to add an apple to a table. It will just add the apple to the scene. If you choose Original instead it will sort of try to use the old object that was in the scene and sort of transform the old object to the new one. Its kind of complicated its sort of it making two different pictures comparing them and filling in the blanks of how they should fit together.

STARTING OUT

The option for inpaint area is next. Whole picture or masked only. Whole picture is basically the same as original. masked only only focuses on the masked part. Its sort of the difference between. Just adding something extra that you forgot to the picture. And the other from the pictures sort of blending together. Hmm. How to explain. Lets say original with whole picture works best for it if the new object has to be touching something. Lets say you have a picture of a person holding a dog right. You want to change it to a cat. Original plus whole picture would try to "add" the cat to the scene organically. on the other hand masked and fill would just "plop" the cat into the scene. It usually works well when things don't touch.

MASK

Mask mode is really self explanatory. Inpaint masked or inpaint not masked. Well. The first one is you change the things that are masked. The latter is you change the things outside the mask. It works best to change the environment. Lets say you keep putting into the image that you want a spooky setting. But you have too may words in the prompt. So you don't know what to change to make it a different environment. It happens to me a lot since I use a lot of loras. Just inpaint the object you want then delete the prompt. Save it somewhere in case you make a mistake. And then start a new prompt to only change the setting. Its actually very simple.

PADDING PIXELS

So then what are padding pixels anyways? Well think of it like this. You drop a peddle in a pond. It ripples. The padding pixels are sort of like the ripples. The AI takes into account the size of the ripples to understand how the object fits into the scene. Like lets say my padding is too small. The AI will not really understand how the object fits. The higher the padding. The more of the picture that it will take into account. Normal programs have about 30 as the default. That is not very much. I would suggest if you want it to actually fit into your picture set it about 50 to 80. When I started I kept making the mistake of leaving it as default. It really does make a huge difference. IMO.

SAMPLING

Ill make the next simple. There are a whole lot of settings for sampling method. I never had good results with using anything that wasn't either. DIMM or DPM++2M SDE Huen Exponential. DIMM seems to be the faster one. And most people will probably want to stick with that one. The latter is kind of beefy and slower. So just stick with DIMM to begin. Inpaiting is kind of different than just making pictures. Normally you don't want to do anything higher than 30 steps when making a picture. In inpainting its better to have higher values. lets say 50 to 80. you can go higher but that kind of overkill. So just stick to 50 to 80 steps.

GFC SCALE

I don't think I have to even explain resizing. Most people understand that. So lets move on to the bane of everyone's existence. GFC scale and denoising. Low GFC makes the AI try to stick to your prompt. At low levels the AI will think your prompt is king. It will try to make it as close to your prompt as possible. On higher levels the result is more....."creative" you give it more leeway to change or add things as the AI sees fit. If you want to add that object that you want stick to lower levels. About 2 to 3 works well. If you want to go higher you can probably go up to 7. I hear people say that higher than 7 is okay. But honestly. I don't get good results.

DENOISE visibly sweating

Finally Denoising. Simply put. In inpainting. The higher the value the more "different" the end result. You don't usually get good result with going lower than 50 unless you kind of want to change the artstyle or fix minor imperfections. At higher than 50 the picture finally actually changes. I would say start with 60 then move up to 75 to see if you get good results. Anything higher than that will cause some problems. The highest I can go without problems arising is about 85. At 100 it tries to add the item where the mask was. Just stick to the 60 to 75.

MY SETTINGS

I don't want to waste your time. And for the people that are knuckleheads like me. Ill give you my settings. Resize and fill for resize mode. Mask blur at 4. mask mode is inpaint masked. Masked content is Original. Inpaint area is whole picture. Only masked pixels is 80. Sampling and schedule type is DPM++2M SDE Huen Exponential. You should probably use DIMM though its faster. Sampling steps is 80 but you can use 50 and go up to start. Resize is 1.25 since I start off with 832x1216. Gfc scale I do from 2 to 3. And finally I do 55 to 75 for denoise. Start off with 60 and slowly move up to see if you like it better. I'm not some expert but hey learning just doing this took me a whole day to figure out. At the very least you have the basics of this very confusing process.

16

Comments