Extraltodeus / depthmap2mask

Create masks out of depthmaps in img2img
355 stars 35 forks source link

Batch img2img error #25

Open kylocat opened 1 year ago

kylocat commented 1 year ago

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

Extraltodeus commented 1 year ago

Hello!

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

kylocat commented 1 year ago

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.

Extraltodeus commented 1 year ago

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