Inpaint whole picture, only masked, and padding explained for Automatic1111

Поділитися
Вставка
  • Опубліковано 20 жов 2024

КОМЕНТАРІ • 86

  • @Hasblock
    @Hasblock Рік тому +23

    Crazy how you were able to explain this concept so simply. No one else out there is doing that. I hope in a year, your channel has blown up because you deserve it.

  • @frankmuller4999
    @frankmuller4999 Рік тому +2

    Started with Stable Diffusion a few days ago. I am getting so much more from the smaller accounts. Thanks man.

  • @flack3
    @flack3 Рік тому +5

    FINALLY! Took you only 5 minutes to explain something that is seems so obscure everywhere online lol Thank you

    • @theubie
      @theubie  Рік тому

      This is a topic that was coming up constantly in the /r/stablediffusion discord. Glad the video I made helped.

  • @trizais
    @trizais Рік тому

    Man, you are the first one that explain in simple words that stuff, THANKS!!!!

  • @voEovove
    @voEovove Рік тому +11

    Best explanation for inpainting faces that I have been able to find! Excellent tutorial. Thank you! Looking forward to seeing more from you.

    • @theubie
      @theubie  Рік тому +2

      Glad it was helpful!

  • @kurtlindner
    @kurtlindner Рік тому +1

    Damn, this was an amazing, and clear, explanation.
    Thank you!

  • @sporospor
    @sporospor Рік тому +12

    Please make an Auto1111 complete guide mate. You're great at explaining this \o/🤩

    • @theubie
      @theubie  Рік тому +3

      I've been brainstorming how to pull that off. I like to keep the videos short and to the point. I'm thinking I might do a series of videos that try to be a "complete guide".

  • @AndyHTu
    @AndyHTu Рік тому

    Bar done the best explanation of ONly masked adding on the internet even after 7 months. I was trying to figure out what it does all day! Thank you for doing this. I credited you as my source on my page :)

  • @thelbronius
    @thelbronius Рік тому +2

    Excellent tutorial! I appreciate the comprehensive and concise explanation of something that had me blindly guessing.

  • @DragonstoneWolfe
    @DragonstoneWolfe Рік тому

    This makes inpainting so much less scary, thank you so much for this tutorial. ❤

  • @MikkoHaavisto1
    @MikkoHaavisto1 Рік тому +1

    Really informative, keep it up! Your video was the first recommended for term "only masked padding pixels".

  • @mulfunction
    @mulfunction Рік тому

    This is really helpful and easy to understand, thank you!

  • @interestedinstuff
    @interestedinstuff Рік тому

    Thanks for that. Good video. Nice and clear. Demos of how the changes in the UI affect the image are very useful. Keep up the good work.

  • @mrhmakes
    @mrhmakes Рік тому

    thanks for explaining this feature of SD so clearly! I feel less of an idiot now :P

  • @amoghvaishampayan3236
    @amoghvaishampayan3236 Рік тому

    Super useful explanation, thank you!

  • @ozordiprince9405
    @ozordiprince9405 Рік тому

    Thanks for making this. Great tutorial

  • @Rasukix
    @Rasukix Рік тому

    actual legend for this explanation

  • @9186737467
    @9186737467 Рік тому

    Perfect explanation. Much appreciated!

  • @roobertmaxity
    @roobertmaxity Рік тому +1

    great video! very precise and good explanation!

  • @Nutronic
    @Nutronic Рік тому +1

    I wish someone like you would do a tutorial on how to train a model with their face showing what kind of pics to use for the best results. The last tutorial I followed for doing this on 2.1 was a 1.5 tutorial and the google colabs all have different options now that nobody seems to explain, that model was trash. This could be down to the options I chose being incorrect or my images. I don't know.

  • @F41nt13
    @F41nt13 Рік тому +1

    Thank you very much. It was so hard to find this info and from trial and errors it wasn't that obvious for me which option does what

  • @ginokrol
    @ginokrol Рік тому +1

    this really helped me a lot thank you

  • @afoo
    @afoo Рік тому

    very helpful , many thanks

  • @CCoburn3
    @CCoburn3 Рік тому +1

    Very useful. Thanks.

    • @theubie
      @theubie  Рік тому

      Glad to hear that!

  • @theternal
    @theternal Рік тому +2

    Did you merge sd-v1-5-inpainting model with your trained model to get better inpainting result?

    • @theubie
      @theubie  Рік тому +1

      No, the model used for the base is not a specific inpainting model. That's actually where using the only masked feature comes into play. Non-inpainting models will produce acceptable inpainting results at higher resolutions, although it won't be as easy to get good seamless results as it is with a specific inpainting-trained model. So, the results you see would be even better if I did use one. Normally, I would switch to an inpainting model if the subject isn't something that's part of a fine-tuned model.

  • @joywritr
    @joywritr Рік тому +1

    This was helpful, thank you very much. Do you happen to know what the Inpaint Sketch tab can do that the normal Inpaint one cannot?

    • @theubie
      @theubie  Рік тому +2

      The inpaint sketch tab works like the inpaint tab in that it will create a mask and then generate a new image in that mask, but it will use whatever color you draw the mask in for its initial noise. An example use would be if you drew a mask over a shirt in inpaint and asked for a green shirt, you may or may not get a green shirt. If you do the same in inpaint mask and use a green color for the mask, you're starting with that color and thus might get more of a green shirt that you're wanting.

    • @joywritr
      @joywritr Рік тому +1

      @@theubie Thank you for explaining. That was pretty much what I thought it did, but I didn't know if there were additional features I was unaware of. Take care!

  • @go-usa
    @go-usa Рік тому +2

    cool. but how did you train a model with your own images of your face? a tutorial about that, would be dope. Thanks a lot and keep rocking, cheers

    • @theubie
      @theubie  Рік тому +1

      That is another area that is changing rappidly. Almost as soon as you make a video for that, things change. I'll look at the method I used (via a Google Colab) and see if I can make a video for it.

    • @thefulcrum
      @thefulcrum Рік тому

      In the meantime, Olivio S has a pretty good tutorial ua-cam.com/video/9Nu5tUl2zQw/v-deo.html
      Maybe TheUbie and Olivio could team up. They are both great at explaining!

  • @jocke8277
    @jocke8277 Рік тому +1

    is this a fine-tuned version of SD? as you can reference yourself like that in the prompt? it basically looks like dreambooth with inpainting but I didn't know that was possible

    • @theubie
      @theubie  Рік тому

      I was using a model trained on a dozen or so images of my face using Dreambooth. The base model was SD 1.5 that it was trained against.

    • @jocke8277
      @jocke8277 Рік тому

      @@theubie cool! did it work good for doing stuff like face/head swapping on images? feel like it should be possible to do

  • @GabrielEugenio87
    @GabrielEugenio87 Рік тому +1

    Hello, who do you get that extra tab at the top (Inpainting conditioning mask strength] ? Thanks

    • @theubie
      @theubie  Рік тому

      It is in Settings, under User interface. There is a text box labeled "Quicksettings list". Add inpainting_mask_weight using comma operators. i.e. "sd_model_checkpoint, inpainting_mask_weight"

    • @GabrielEugenio87
      @GabrielEugenio87 Рік тому

      @@theubie Thank you so much, Cool videos by the way.

  • @Danny2k34
    @Danny2k34 Рік тому +1

    I like the way you explained it and showed live previews as you were explaining. I'd love a similar video about the masked content options because I can't for the life of me figure them out. From my understanding,
    I thought fill basically replaces something and fills it with whatever you have in the prompt
    Original keeps whatever is there, but changes it into something different whilst respecting the pixels in original photo so for example, if you have a shirt on and you wanted to remove it, using original and prompting "ripped body" or something wouldn't work so in this particular situation, would you use fill or one of the other options?
    latent noise/nothing, I have no idea.

    • @theubie
      @theubie  Рік тому +8

      You're asking about Fill | Original | Latent Noise | Latent Nothing? Those refer to what the masked area is filled with before Stable Diffusion begins its generation.
      In a nutshell, inpainting is the same as img2img, only instead of the entire image, it's just the masked area. Those options tell stable diffusion what to start with when you generate.
      Original is exactly the same as img2img. It uses the image exactly as it is under the masked area. This is usually best used when making small changes or trying to add detail to an image.
      Latent Noise is exactly the same as txt2img. It uses a completely random noise map generated using the seed. This is a good one to select when you're trying to completely change the composition under the mask.
      Fill attempts to fill the masked area with colors from the edges the mask touches, and is best suited for when you're trying to use inpainting to remove something.
      Latent nothing is basically the same as drawing a selection on an image in photoshop and hitting delete. It turns the pixels in the masked area into empty data. I honestly don't have any good use cases for this one, but it could be useful for someone I guess.
      I'll put this on my list of videos to look into making.

    • @CrixusTheUndefeatedGaul
      @CrixusTheUndefeatedGaul Рік тому

      ​@@theubieIve used Latent Nothing to inpaint objects into an image that werent in the original prompt. Works pretty well so long as the shape of the mask roughly resembles whatever youre trying to inpaint

    • @thefulcrum
      @thefulcrum Рік тому

      @@theubie Thanks for your generous descriptions and explanations. A1111 also has some tooltips for these options now

  • @KidCoyle
    @KidCoyle Рік тому

    Thank you.

  • @arunuday8814
    @arunuday8814 Рік тому +1

    Hi, how do you get the inpainting to use a specific trained model? Can you pls explain? Thx

    • @theubie
      @theubie  Рік тому

      What I meant in this case was I trained a model using picture so of myself. You can use any model for inpaint, although some models are trained specifically for inpainting. The model I was using was not trained specifically for inpainting.

    • @arunuday8814
      @arunuday8814 Рік тому +1

      @@theubie so does webUI allow one to select the specific model while inpainting?

    • @theubie
      @theubie  Рік тому

      @@arunuday8814 Yes! It uses whatever model you have selected at the top in the dropdown box. So you can change the model you have selected there and it will be the model used when doing inpainting. This also means you can generate an image with one model, then change to another model to do the inpainting.

    • @arunuday8814
      @arunuday8814 Рік тому

      @@theubie Thanks so much TheUbie. Sincerely appreciate it

  • @ProdByGhost
    @ProdByGhost Рік тому +1

    thanks

  • @therookiesplaybook
    @therookiesplaybook Рік тому

    What video card do you have to be getting images back that fast?

    • @theubie
      @theubie  Рік тому +1

      I've got a 2060 Super. Not exactly the most powerful card you'll see being used, but it does the job well enough.

    • @therookiesplaybook
      @therookiesplaybook Рік тому

      @@theubie Thanks. Could you be more specific on brand etc? Thanks.

    • @theubie
      @theubie  Рік тому

      @@therookiesplaybook Sure. It's an EVGA RTX 2060 Super with 8GB of GDDR6. I think new they run about $500 right now.

    • @therookiesplaybook
      @therookiesplaybook Рік тому

      @@theubie How big can you got on your images. I do anything over 1000 x 1000 and it runs out of memory. Is that video card issue or something else?

    • @theubie
      @theubie  Рік тому

      @@therookiesplaybook I rarely generate the inital images over 768x768. After I work an image in both SD and Photoshop where I want it, I use upscaling to push it into the 2k to 4k range. SD Ultimate Upscaller is wonderful for that.

  • @bunnystrasse
    @bunnystrasse Рік тому

    Thanks beo

  • @joelsjunk239
    @joelsjunk239 Рік тому +1

    what gpu are you using?

    • @theubie
      @theubie  Рік тому +1

      RTX 2060 Super with 8gb of vram

  • @generalawareness101
    @generalawareness101 Рік тому

    I have never been able to get inpaint sketch to work as I get this error most times - ValueError: Coordinate 'right' is less than 'left'. I even disabled all extensions and watched a vid, but I have always had this error with it.

    • @theubie
      @theubie  Рік тому

      I honestly do not use inpaint sketch, as it doesn't fit in with any of my workflows. I hear that if you are using DuckDuckGo Privacy Essentials, it will break inpainting. github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1044 I would look at your browser extensions as possible problems.

    • @generalawareness101
      @generalawareness101 Рік тому

      @@theubie Don't use duckduckgo for anything and I have absolutely no extensions in the browser I use solely for automatic1111

    • @theubie
      @theubie  Рік тому

      @@generalawareness101 Not sure then. There are multiple issues both open and closed with that error on the github. Most of the solutions are privacy extensions causing issues, but I didn't read all of them. I just did a quick skim.

    • @generalawareness101
      @generalawareness101 Рік тому

      @@theubie Yeah, and a friend of mine I asked, and he said he tried it once, and it made his computer overheat and the fans all revved up so he hasn't touched it since.

  • @inyeung6481
    @inyeung6481 Рік тому

    I still don't quite understand what is the difference between Inpaint area
    - Whole picture
    - Only masked
    Which one should I use if I am trying to replace the background of a product image?

    • @christophhaas5696
      @christophhaas5696 Рік тому +1

      So if use whole picture it will reproduce the whole picture, but changing only your selected area. With only masked area it will only focus on the said masked area. So it basically has a higher resolution for a face or samething like this as its generating a full resolution fave and puts it in. In the end it’s quite similar, but masked only is often more detailed. Whole picture blends in more smoothly with the rest of the image.
      For product image try using whole image because you want the background to blend in better.
      For mask mode use inpaint not masked and mask only the product you dont want to change. Its like a reverse mask.
      Hope the helps✨

    • @interestedinstuff
      @interestedinstuff Рік тому

      @@christophhaas5696 When I do only masked I end up with a mini picture in my masked area that has very little to do with the rest of the image. I'm clearly not selecting something right.

    • @christophhaas5696
      @christophhaas5696 Рік тому +1

      @@interestedinstuff thats what im saying. Use whole picture to let it blend in better. You can also try to make the mask blur higher or make the padding pixels higher when using only masked. Blur helps for a better seam and padding pixels uses more pixels of the image to create the new ‚image‘ for the masked area.
      I’m there if you need more help 👋

    • @interestedinstuff
      @interestedinstuff Рік тому

      @@christophhaas5696 Gotcha. Thanks for the help. Working now. Yay.

  • @PkKingSlaya
    @PkKingSlaya Рік тому

    Jesus christ thanks for this

  • @m.kislov
    @m.kislov Рік тому

    Такая схема подходит только для небольших изменений, когда нет задачи получить какой-то особенно конкретный результат. Но вы столкнётесь с большими проблемами, если, например, захотите удалить бороду с лица человека. Потому что до ~0,59 там вообще почти ничего не меняется (если брать оригинал, а не заполнение), а после довольно быстро начинает подсовывать всякую ерунду, или, в лучшем случае, будет выбритое лицо, но совершенно другого оттенка.

    • @theubie
      @theubie  Рік тому

      Sorry, not my language, but google translate says you are talking about not working for specific results. While you are partially correct, the video itself was not about getting a specific result, but rather an explanation of what each of the settings is for. Also, there was a specific result I was trying to get. The face that was created originally was a general face. The face created via inpainting was actually MY face from a trained model. You can get specific results on those scales, but it takes knowledge of prompting and how to deal with the settings.
      However, those are all out of the scope of the video itself.

    • @m.kislov
      @m.kislov Рік тому

      @@theubie гугл переводчик - топ! :)
      Я вас понял. Я обратил на это внимание тех, кто может быть искал именно про конкретные результаты. Если у вас есть такая информация, хотелось бы про получение конкретных результатов. Например: убрать/добавить бороду, поменять цвет кожи лица (не поменяв, при этом, форму рта, носа, глаз и так далее), сменить одежду и т.д.
      Особенно актуально, если пытаешься сделать композицию с нуля.

  • @researchandbuild1751
    @researchandbuild1751 Рік тому

    Inpainting pisses me off so much because it never works like people show

  • @aegisgfx
    @aegisgfx Рік тому +2

    So Im confused, under what circumstances would you ever mash something, then generate the entire image? Wouldnt you always want to generated the masked area only??

    • @theubie
      @theubie  Рік тому +1

      Whole image is the old default behavior. I can't personally suggest any really great use cases for it, although I'm sure some people probably have reasons for it.