stable-diffusion-webui-depthmap-script
stable-diffusion-webui-depthmap-script copied to clipboard
Too many open files
When doing a "batch from directory", is it necessary for the script to open all the files at once?
On many Linuxes this creates an issue with too many open files and possibly all sorts of memory issues. I think the offending code is in common_ui.py:
image_list = backbone.listfiles(depthmap_batch_input_dir)
for path in image_list:
try:
inputimages.append(Image.open(path))
inputnames.append(path)
.
.
.
I would second this, I think the file should be opened when it is actually processed not when it is being read into the queue. This makes little sense and make the batching feature quite impractical.
I was splitting an animation into singular images and intended to process them from a directory. We're talking thousands of images. However, I can't batch process them at the moment due to this limitation.
You may try to increase the maximum number of opened file descriptors.