Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch img2img error #25

Open
kylocat opened this issue Dec 9, 2022 · 3 comments
Open

Batch img2img error #25

kylocat opened this issue Dec 9, 2022 · 3 comments

Comments

@kylocat
Copy link

kylocat commented Dec 9, 2022

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
Copy link
Owner

Hello!

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

@kylocat
Copy link
Author

kylocat commented Dec 11, 2022

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants