Closed Dachiko closed 8 months ago
Just want to add that ImageSave node works flawlessly, maybe you could steal the code from it :)
This %counter is slightly different from the %counter in the built-in Saver node, it will count all image files in the path.
That means you already have 7,039 images in your folder.
Is the ImageSave node you mentioned a built-in node? If not, please tell me which specific node set it belongs to.
This %counter is slightly different from the %counter in the built-in Saver node, it will count all image files in the path.
That means you already have 7,039 images in your folder.
Is the ImageSave node you mentioned a built-in node? If not, please tell me which specific node set it belongs to.
It's some third-party node, but I'm not sure how to check the identity.
UPD It looks like it's a WASnodesuit node
I just read the source code of image save, it seems to only support a fixed file name format, such as prefix + separator + number, or vice versa. Prompt saver supports many placeholders and can adjust their positions arbitrarily, so its handling of file names is much more complicated than image save. Therefore, I may not be able to achieve the effect you want.
I would appreciate if you'd make a conditional logic for the case when number is the leading placeholder. It just looses it's value in case when part of the files removed from the folder. But anyway, thank you for your work!
I rethought it, and I think the problem is here: most people don't use just serial numbers as filenames like you do. So, should the serial number continue when other parts of the filename (such as %time) change? Or should it be considered as a new set of serial numbers? What if all parts of the filename apart from %counter are changed? Therefore, I think the current method (calculating the total number of files in the folder) is the most conservative one.
Another approach is, you can use a separate node to record the sequence number of the image, and use it as the filename (or concate it with other strings) to input into the saver.
Like this one
Everything comes from WAS Node Suite.
I rethought it, and I think the problem is here: most people don't use just serial numbers as filenames like you do. So, should the serial number continue when other parts of the filename (such as %time) change? Or should it be considered as a new set of serial numbers? What if all parts of the filename apart from %counter are changed? Therefore, I think the current method (calculating the total number of files in the folder) is the most conservative one.
Thanks for the workaround, but it's too complicated to use in multiple workflows or across different backends. The practice I use comes from A1111. I always had it as a leading number + prompt / model name. It was quite a long time ago, so I don't remember, but I think it was a default naming convention. Not sure what convention people use usually. Maybe I should use date as a leading part, it could probably allow me to still have the latest generations at the end of the list. I liked to use simple number because it worked the same no matter what backend I used, my images were always in perfect order.
Description
Not sure how exactly it works. I have a folder with a lot of images, all of them have a leading number (the first file is like "05951 xyz.png" and the last one "105951 xyz.png"). There are gaps between file numbers (I delete images I don't like).
I expect %counter to return a number 105952, which is the last leading number in the folder.
Instead It returns some arbitrary number like 07040, and occasionally 07040_1 and 07040_2.
Basically I'd like to have fresh generations at the end of the file list.
Reproduction steps
No response
Image file