[X] I have searched the existing issues and checked the recent builds/commits
What happened?
The saving of the image failed with an error inside the console, and the batch generation was aborted.
This issue seems to be randomic, not always reproducible.
Note: the "--listen" batch parameter is set and the batch is generated from a remote device.
Steps to reproduce the problem
Go to txt2img tab of the web interface from a remote device
Press generate with any prompt, set batch count to 4 or 5
look at the console output, sometimes the error will be reproduced
What should have happened?
The batch generation should finish without errors.
Traceback:
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\call_queue.py", line 36, in f
res = func(*args, **kwargs)
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\txt2img.py", line 55, in txt2img
processed = processing.process_images(p)
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\processing.py", line 732, in process_images
res = process_images_inner(p)
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack
return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\processing.py", line 932, in process_images_inner
images.save_image(image, p.outpath_samples, "", p.seeds[i], p.prompts[i], opts.samples_format, info=infotext(i), p=p)
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\images.py", line 672, in save_image
_atomically_save_image(image, fullfn_without_extension, extension)
File "C:\Users\MyUser\stable-diffusion-webui-ok\stable-diffusion-webui\modules\images.py", line 664, in _atomically_save_image
os.replace(temp_file_path, filename_without_extension + extension)
PermissionError: [WinError 32] Impossibile accedere al file. Il file è utilizzato da un altro processo: 'E:/Immagini/stablediff-output/txt2img-images\\2023-09-17\\00000-1427175482.tmp' -> 'E:/Immagini/stablediff-output/txt2img-images\\2023-09-17\\00000-1427175482.png'
Additional information
A workaround is to retry the "os.replace" after a short amount of time, until it doesn't throw the exception anymore. It seems that on windows the temporary file is still in use when the script tries to rename it into the final png image.
same error with doing batching. error happen everytime. with this error code:
stable diffusion permissionerror: [winerror 32] the process cannot access the file because it is being used by another process:
Is there an existing issue for this?
What happened?
The saving of the image failed with an error inside the console, and the batch generation was aborted. This issue seems to be randomic, not always reproducible.
Note: the "--listen" batch parameter is set and the batch is generated from a remote device.
Steps to reproduce the problem
What should have happened?
The batch generation should finish without errors.
Sysinfo
sysinfo-2023-09-18-20-35.txt
What browsers do you use to access the UI ?
Google Chrome
Console logs
Additional information
A workaround is to retry the "os.replace" after a short amount of time, until it doesn't throw the exception anymore. It seems that on windows the temporary file is still in use when the script tries to rename it into the final png image.
No response