ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Create non-existent folders when saving images

Open jordanbtucker opened this issue 2 years ago • 2 comments

When I set the filename prefix to testing/dog or testing\dog, no images are saved to the output folder. Instead, an error is logged in the console.

FileNotFoundError: [Errno 2] No such file or directory: '...\\ComfyUI\\output\\testing\\dog_00001_.png'

Creating a testing folder in output fixes the error. It would be great if ComfyUI could create any missing folders for the user instead.

jordanbtucker avatar Mar 13 '23 20:03 jordanbtucker

Looks like there is a PR for this already.

Fixed by #60

jordanbtucker avatar Mar 13 '23 20:03 jordanbtucker

I just realized that creating the folder manually does not properly index the files when they are saved. All files start with the index 1, so they are overwritten each time. #60 fixes this issue too.

jordanbtucker avatar Mar 13 '23 21:03 jordanbtucker

This is solved by #60

comfyanonymous avatar Mar 20 '23 21:03 comfyanonymous