A method of Out Painting In ComfyUI

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

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

  • @Gabriecielo
    @Gabriecielo 10 месяцев назад +2

    The best outpaint solution I have ever found on RUclips, thanks a lot.

  • @elan4912
    @elan4912 10 месяцев назад +1

    Very very useful!! I will use this technique of yours a lot. Thanks for sharing the workflow.

  • @JonathanChalker
    @JonathanChalker 7 месяцев назад +3

    (Error solve) Going to try to explain the avoidance of the 'expected 4, got 3' error in the Pixelize (and Pixelate in V2) in a little more detail than Rob has. If you're understanding what the nodes are doing, it will become obvious, so I understand why Rob might not belabor it. However, it won't hurt to spell it out. I think it is easy to assume that a lot of you are bringing in images that are 1024x1024 (the standard for SDXL-based models). The ImageCrop node is attempting to get a sliver from inside your image, so you need to adjust the X value. The X value is where the sliver selection starts. It starts at that point and gets a sliver that is the width setting in the node. If you use Rob's X value of 1476, it is trying to crop a sliver outside of your right margin since 1476 is a starting point greater than your width of 1024. The X value + the width of the sliver MUST be less than the width of your image. So if you have a 1024 image, using an X value of 960 will get a sliver close to where Rob is getting it. It will take the sliver from 960px to 989px. If you're using an image generated from sd1.5 that is 512px wide, your X value for the same exercise would be something like 470. Also important is the ImageCompositeMasked node, where you need to ensure the X value is the width of your original image if you're replicating Rob's exercise of outpainting from the right margin of your image. In general, it would be good to think through the spatial mapping for each step as you go. If you're trying to outpaint from the left margin, all this stuff will need to change accordingly and we can assume you'd need to change the orientation of the sliver selection for vertical outpainting.

    • @robadams2451
      @robadams2451  7 месяцев назад +1

      Thanks for great explaination! Yep, you need to do the math first or it will try to crop a non existent bit of image. I do go through how the numbers work. I updated the information under the video to stress this. I'll make an update video soon. I now know how to pipe the numbers around using math nodes so I should be able to automate most of the process.

    • @JonathanChalker
      @JonathanChalker 7 месяцев назад

      @@robadams2451 Yes, I caught that you had made clear the need, but I know that some people will just abandon if they can't get the workflow to run within the first few tries and figured it may be good if they know the specific parameters likely keeping them from their first successful run. Great workflow by the way!

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

      Thanks for the explanation. And if I want to apply outpainting to Left, top, right y bottom to an image of 1024x1024 should this be the configuration?
      Pad Image= Left 256, top 256, right 256, bottom 256. ImageCrop= width 29, height 1024, x 960 y 960. ImageCompositeMasked= x 1024 y 1024. Random Noise= width 256 height 1024.Image Flip= horizontal ?

  • @andykoala3010
    @andykoala3010 10 месяцев назад +1

    Great video and definitely not an approach i had come across before

  • @Fakery
    @Fakery 4 месяца назад

    it worked well for me. thank you for sharing

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

    Thanks for the workflow and video. And if I want to apply outpainting to Left, top, right y bottom to an image of 1024x1024 should this be the configuration?
    Pad Image= Left 256, top 256, right 256, bottom 256. ImageCrop= width 29, height 1024, x 960 y 960. ImageCompositeMasked= x 1024 y 1024. Random Noise= width 256 height 1024.Image Flip= horizontal ?

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

      This vid is quite old now and the nodes have changed somewhat. I'm going to do a new version quite soon as there are now some better ways.

  • @DerekShenk
    @DerekShenk 10 месяцев назад +1

    Any suggestions on resolving this error: Error occurred when executing Pixelize:
    not enough values to unpack (expected 4, got 3)? Tried png and jpg images 768x1024

    • @robadams2451
      @robadams2451  10 месяцев назад

      Odd it is a very simple node, not much to go wrong! There is another Pixellate node out there try that. Have you tried it with only a load image and an image preview, nothing else active?

    • @DerekShenk
      @DerekShenk 10 месяцев назад

      Turns out that if "ImageCrop" numbers aren't proper, Pixelize throws that error. Thanks for your prompt response!@@robadams2451

  • @sangeethkc7236
    @sangeethkc7236 9 месяцев назад +1

    Error occurred when executing Pixelize:
    not enough values to unpack (expected 4, got 3)
    How to fix this?

    • @robadams2451
      @robadams2451  9 месяцев назад

      It might be conflicting with another node you have installed, there's another pixelize node try that.

    • @voxyloids8723
      @voxyloids8723 7 месяцев назад

      @@robadams2451 Same for me. I try WF v2 and there got another error like - can't reshape size 715 into shape 3

    • @JonathanChalker
      @JonathanChalker 7 месяцев назад

      @@voxyloids8723 ​ The problem is very likely your crop settings. If you're using an image of standard width of 1024px and are trying to replicate the example above, you'll change the X setting in the Image Crop to something like 960. You'll also need to change the X setting in the Image Composite Mask node to be the width of your image (so 1024 for images generated with SDXL).

  • @Sergonizer
    @Sergonizer 7 месяцев назад

    is it the checkpoint issue if my image is not getting outpainted but only gets some blur?

    • @robadams2451
      @robadams2451  7 месяцев назад

      Hard to say, maybe not enough steps, or the denoise is too low.

    • @Sergonizer
      @Sergonizer 7 месяцев назад

      @@robadams2451 both were my first thoughts. I tried 40 steps and 1.00 denoise. It resulted in a VERY smooth blur:)

  • @davidbell6101
    @davidbell6101 10 месяцев назад

    if you the various feature extraction tools to build masks you could adapt this to a generalized image modification tool.

    • @robadams2451
      @robadams2451  10 месяцев назад

      Yeah the bits modified don't have to be rectangular. I just did an extension on both sides at once and it worked perfectly, the most useful feature of the method is in the simple image color correct node as you can fine tune the out painted area so there is very little sign of a seam. I hit one problem in that some of the mask composite nodes are conflicted.

  • @iresolvers
    @iresolvers 8 месяцев назад

    I got an error with color correct ValueError: not enough values to unpack (expected 4, got 3)
    anyone know how to fix this??

    • @robadams2451
      @robadams2451  8 месяцев назад

      Go to the install customer nodes in Manager and uninstall and then reinstall. They get broken by ComfyUi updates but the makers are pretty good at getting a fix out. Restart and I would hope that fixes it.

  • @marcovth2
    @marcovth2 10 месяцев назад +3

    Is there a way to give you 10 thumbs up?

  • @Nojlink
    @Nojlink 9 месяцев назад +1

    Too bad, does not work, an error occurred when running Pixelize:
    not enough values for unpacking (expected 4, received 3)

    • @robadams2451
      @robadams2451  9 месяцев назад +1

      Someone else had this error, I checked the node it works fine for me. There are two other pixelate nodes that to a similar thing, search in Manager for pixel then substitute. It may be you have old versions of the node. I don't like to run update all so I find the node, uninstall it and then reinstall, which gives you any updates.

  • @vb6code
    @vb6code 8 месяцев назад

    I'm getting gray :s

  • @Shotidyada
    @Shotidyada 8 месяцев назад

    Hello from Ukraine! I'm writing through Google Translate, so forgive me)
    Anyone who has a problem with the Pixelize node error should know that the author made a mistake - he has all the settings for his image size
    The author should either provide a calculation of the image size based on the size of the uploaded one, or indicate what size was used in the original, so that it could be calculated
    Sincerely, loving Ukraine! Give us weapons!

    • @robadams2451
      @robadams2451  8 месяцев назад

      I have added a new workflow, pixellize not compatible with some installs.
      drive.google.com/file/d/1uBE6PtKignTnHHqlATJwowBcOIaSLFv5/view?usp=sharing

    • @Shotidyada
      @Shotidyada 8 месяцев назад

      @@robadams2451 Sir, with all due respect - none of your methods work for me because the problem is not compatibility
      Look at the two nodes after loading the image - they are cropped to some size known only to you) If you upload a smaller image, then the part that you crop for pixelation is simply not there! That's why the pixelizer gives an error! There are no pixels) I connected my 1024 by 1024 image directly, bypassing the crop nodes and voila! Everything worked! Pixelizer didn't show any errors
      There are many places in your nodes where you calculate the spacing and dimensions based on your calculator in your head based on the size of your image in the training video. People open their image, their size, and everything collapses!

    • @robadams2451
      @robadams2451  8 месяцев назад

      @@Shotidyada Yes you have to work out the dimensions. I explain this but in English! If the area to be cropped is outside the input image then it will throw an error. It cannot pixelize if there is no data. So for 1024 wide the crop must be less than 1024. If the x is 768 then the crop width will be 256.

    • @robadams2451
      @robadams2451  7 месяцев назад

      Yes you obviously have to adjust the dimensions to your chosen image. I do explain that in the video. I will add a note stressing it in the video description.