Change background with inpaint & RemBG in ComfyUI, A.I. Stable Diffusion

Поделиться
HTML-код
  • Опубликовано: 1 фев 2024
  • In this workflow I will show you how to change the background of your photo or generated image in ComfyUI with inpaint. This can be useful if your prompt doesn't allow you to get the specific background you wish for. Sometimes it is easier to generate foreground and background one by one and then mix them together with a specific inpaint maodel and a mask.
    Please comment if you have questions or tell me your suggestions for future videos.
    Below you find the links to the needed models and custom nodes
    Models:
    huggingface.co/XpucT/Delibera...
    Custom nodes:
    github.com/WASasquatch/was-no...
    github.com/Nourepide/ComfyUI-...
    Connect with me:
    / _neuron_ai
    / _neuron_ai
    The equipment that I use (affiliate links):
    GPU: ASUS ROG STRIX RTX 4090 amzn.to/42ptUTi
    #comfyui #stablediffusion #tutorial #animatediff #automatic1111 #aiart #ai #batchprocess #rembg #inpaint
  • НаукаНаука

Комментарии • 27

  • @LuckRenewal
    @LuckRenewal 3 месяца назад +2

    thank you. this is very useful. it's a lot quicker than what other people are showing. simple and clean

    • @neuron_ai
      @neuron_ai  3 месяца назад

      Thank you for the nice words :)

  • @britebay
    @britebay 12 дней назад

    I appreciate you for sharing this. Thanks!

  • @dougsbir
    @dougsbir 4 месяца назад +1

    great work thankyou so much

    • @neuron_ai
      @neuron_ai  3 месяца назад

      thanks for you comment :)

  • @Make_a_Splash
    @Make_a_Splash Месяц назад

    Very nice, thanks. Result is not great, but that probably is due to the checkpoint. I'll keep experimenting.

  • @godorox
    @godorox 29 дней назад +1

    Great tutorial, I have one question: How can I create a empty scene? Even though I put "man, woman, people" in negative prompt, there's always someone behind my main guy (my source image). I tried "grey background" to test and occurs de same.

    • @neuron_ai
      @neuron_ai  28 дней назад +1

      Yeah this is something which bugs me too. You could try to build a scen like in rhis tutorial and let the ksampler dream over it. ruclips.net/video/mAUpDrvs45k/видео.htmlsi=MrX51HMwJOlkcSQ6

    • @godorox
      @godorox 25 дней назад

      @@neuron_ai Thx!

  • @ademayaashari1393
    @ademayaashari1393 3 месяца назад +2

    i cant found node on my comfy alpha channel as mask, only alpha channel add by mask only

    • @neuron_ai
      @neuron_ai  3 месяца назад +1

      Hi, if the search is not bringing the node up you can add it via the following: right click on background: add node > image > alpha > alphachannelasmask . be sure that the allor custom node is installed. hope that helps

    • @ademayaashari1393
      @ademayaashari1393 3 месяца назад +1

      it works, thanks mate

  • @user-wh7jr6zl9p
    @user-wh7jr6zl9p 2 месяца назад +1

    I can't find the node named alphachannelasmask in this page

    • @neuron_ai
      @neuron_ai  2 месяца назад +1

      you have to install the allor custom nodes. then you can double click on the brackground and search for it.

  • @caseyj789456
    @caseyj789456 Месяц назад

    cool got it :)

  • @guangxing9010
    @guangxing9010 13 дней назад

    The node installation failed. How to install it manually? Where to install it?

    • @neuron_ai
      @neuron_ai  13 дней назад

      You need to restart the server and then refresh the browser.

    • @guangxing9010
      @guangxing9010 12 дней назад

      @@neuron_ai Thanks!

  • @tailongjin-yx3ki
    @tailongjin-yx3ki Месяц назад

    RuntimeError: Given groups=1, weight of size [128, 3, 3, 3], expected input[1, 4, 1024, 1024] to have 3 channels, but got 4 channels instead
    why i have this issue?

    • @neuron_ai
      @neuron_ai  Месяц назад

      that could be caused by the image you load.
      Does the image have any alpha channel? do you get the error as well when loading a normal jpg?

    • @tailongjin-yx3ki
      @tailongjin-yx3ki Месяц назад

      @@neuron_ai only jpg works?

    • @neuron_ai
      @neuron_ai  Месяц назад +1

      @@tailongjin-yx3ki no also png works. if jpgs work you might to have to convert the png first unless you can process it further. I think your png might have an alpha channel which might cause the error message.

  • @BjornV1976
    @BjornV1976 Месяц назад

    only the Rembg gives my all kinds of errors. like CUDA problems.

  • @darkhorse29-yx8qh
    @darkhorse29-yx8qh Месяц назад

    YOU TALK SO DAMN SLOWWWWWWWWWWWWWWWWWWWWWWWW!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @neuron_ai
      @neuron_ai  Месяц назад

      I am sorry. I am a sloth. You can speed it up if it is to slow for you.