InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Can't make new images after outpainting

Open jwax33 opened this issue 2 years ago • 4 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

No response

What happened?

After using the Unified Canvas to outpaint an image, I'm unable to generate new images in the Text2Image tab. They keep failing with the error below. Note that 832 just happens to be one of the dimensions of the previously outpainted image result. I've tried clearing the Unified Canvas every way I can but this keeps happening:

`boolean index did not match indexed array along dimension 0; dimension is 512 but corresponding boolean dimension is 832

Traceback (most recent call last): File "c:\invokeai\invokeai.venv\lib\site-packages\backend\invoke_ai_web_server.py", line 1125, in generate_images self.generate.prompt2image( File "c:\invokeai\invokeai.venv\lib\site-packages\ldm\generate.py", line 492, in prompt2image results = generator.generate( File "c:\invokeai\invokeai.venv\lib\site-packages\ldm\invoke\generator\base.py", line 98, in generate image = make_image(x_T) File "c:\invokeai\invokeai.venv\lib\site-packages\ldm\invoke\generator\omnibus.py", line 138, in make_image return self.sample_to_image(samples) File "c:\invokeai\invokeai.venv\lib\site-packages\ldm\invoke\generator\omnibus.py", line 171, in sample_to_image corrected_result = super(Img2Img, self).repaste_and_color_correct(gen_result, self.pil_image, self.pil_mask, self.mask_blur_radius) File "c:\invokeai\invokeai.venv\lib\site-packages\ldm\invoke\generator\base.py", line 150, in repaste_and_color_correct np_image_masked = np_image[mask_pixels, :] IndexError: boolean index did not match indexed array along dimension 0; dimension is 512 but corresponding boolean dimension is 832`

Screenshots

No response

Additional context

No response

Contact Details

No response

jwax33 avatar Dec 15 '22 21:12 jwax33

I can not reproduce it on my installations. Please shutdown the invoke.py script completely, update, start and then see if it happens again. If it does, please try to provide exact steps of what you are doing.

Barafu avatar Dec 16 '22 00:12 Barafu

Still occurs on my local PC as well as on a Renderpod pod running InvokeAI.

Steps to reproduce:

  1. Upload an image to the Unified Canvas or use a generated one.
  2. Click on the Move Tool icon.
  3. Use the Move Tool to expand the size of the frame around the image for outpainting
  4. Change the model to the SD1.5 inpainting model
  5. Generate some outpaintings
  6. Discard or save them, does not matter
  7. Return to Txt2Img tab
  8. Enter a prompt and attempt to generate more images
  9. ERROR appears when image is almost complete and log says "Server error: boolean index did not match indexed array along dimension 0; dimension is 512 but corresponding boolean dimension is 768" Where 768 is one of the dimensions on the earlier outpainted image bounding box

Resetting the bounding box back to 512x512 in the Unified Canvas does not change this

jwax33 avatar Dec 16 '22 02:12 jwax33

Ok, I confirm the sequence leads to crash as described, on the latest main. The key thing is that it only happens when switching to inpainting model, and not any other. Switching back to another model solves it. You are not supposed to use inpainting model on text2img tab anyway. Inpainting is a very special beast, it ignores half of the settings and treats your prompt differently.

Barafu avatar Dec 16 '22 19:12 Barafu

It's the opposite for me. Can't outpaint anymore after outpainting once. Instead, it always creates new images now.

VictorZakharov avatar Dec 19 '22 16:12 VictorZakharov

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 14 '23 06:03 github-actions[bot]