Configure the Save Image node of ComfyUI to save files in directories by date and name them according to the current time
By default, ComfyUI generated images will be dumped in the output folder with the meaningless filename ComfyUI_00001_.png with increasing numbers.
Setting custom output path and filename in Save Image node
- Click the filename_prefix widget in your Save Image node.
- Edit as follows: %date:yyyy-MM-dd%/%date:hhmmss%
- This will save files in a subfolder named with the current date.
- The filename will contain the time, so that sorting them alphabetically will naturally sort them chronologically.
Sample format strings
output/date/time.png 👉 %date:yyyy-MM-dd%/%date:hhmmss%
You can also add a value from any node in the format %NodeName.node_value%.
By adding the current time (%date:hhmmss%
) to the beginning of the filename, sorting the folder by name will show the files in the same order they were created.
Disclaimer
The content in this post is for general information purposes only. The information is provided by the author and/or external sources and while we endeavour to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the post for any purpose. Some of the content and images used in this post may be copyrighted by their respective owners. The use of such materials is intended to be for educational and informational purposes only, and is not intended to infringe on the copyrights of any individuals or entities. If you believe that any content or images used here violate your copyright, please contact us and we will take appropriate measures to remove or attribute the material in question.