[Bug]: "Batch from directory" limited to 238 pictures
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
While running a batch of thousands pictures in the "Extras -> Batch from directory" - I noticed that only 238 pictures were upscaled before coming to a full stop. No error message.
Steps to reproduce the problem
- Go to the "Extras Tab"
- Select "Batch from directory"
- Select a directory with more than 238 pictures
- Run the upscale on Lanczos
What should have happened?
The script should continue as long as there are pictures in the folder.
Commit where the problem happens
45a8b758
What platforms do you use to access the UI ?
MacOS
What browsers do you use to access the UI ?
Brave
Command Line Arguments
No
List of extensions
ABG_extension https://github.com/KutsuyaYuki/ABG_extension.git unknown sd-dynamic-prompts https://github.com/adieyal/sd-dynamic-prompts unknown stable-diffusion-webui-wildcards https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards unknown LDSR built-in ScuNET built-in SwinIR built-in prompt-bracket-checker built-in roll-artist built-in
Console logs
No long in the console for that feature.
Additional information
No response
I just tried this with 500 images in a directory. Worked without issues.
Are you always trying this on the same directory? Perhaps there's an issue with your 238th image?
same user posted the question few days ago in discussions, had the same answer. in either case - if there is an issue, needs more info.
I just tried this with 500 images in a directory. Worked without issues.
Are you always trying this on the same directory? Perhaps there's an issue with your 238th image?
No, I actually have to do batches of 238 pictures each time. Not sure how I can further pin down where the problem comes from since there are no logs in the console.
It is caused by too many open files. You can solve it by run ulimit -n 50000.
There should be a print in https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/postprocessing.py#L37.
Refer to https://stackoverflow.com/questions/18280612/ioerror-errno-24-too-many-open-files.
@vladmandic FYI
Fixed in https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12479