depthmap2mask icon indicating copy to clipboard operation
depthmap2mask copied to clipboard

Batch img2img error

Open kylocat opened this issue 3 years ago • 3 comments

Been having this problem when trying to batch img2img

File "\stable-diffusion-webui\extensions/depthmap2mask/scripts/depthmap_for_depth2img.py", line 161, in calculate_depth_maps img_output2[:,:,0] = img_output / 256.0 IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed

kylocat avatar Dec 09 '22 13:12 kylocat

Hello!

Would you happen to be saving the images in jpeg? I know for sure that this can create an error.

Extraltodeus avatar Dec 10 '22 17:12 Extraltodeus

It's saved in .png format. However, I was somehow able to fix the problem by cropping the original images from 500x500 to some 280x500. I am not too certain but it seems that the error has something to do with the batch images' dimension.

It only happens in batch img2img tho, in normal img2img the image's dimension doesn't cause any problem.

kylocat avatar Dec 11 '22 04:12 kylocat

Might be related to the size of your images. Try to avoid using the "match input size" if you encounter this error.

Extraltodeus avatar Dec 14 '22 14:12 Extraltodeus