Skip to content

Improvement to generator of new filenames #30

Description

@morganavr

I was regenerating images using the same seed but slightly different prompts and I have these image files:

000002.706865549.png
000003.706865549.png
000005.706865549.png

Then I deleted file 000003.706865549.png (script is still running) and newly generated file was not named 000006.706865549.png as I would expect but as 000003.706865549.png. It is a problem because it makes browsing files in historical order (sorted by file name) impossible.

It would be great if newly generated files would be named as "already_assigned_max_number + 1"

One way to implement it is to create "counter.txt" file inside "img-samples" folder. Inside it will be a number.
It will start with 1 and with new image it will be incremented by 1. With this approach it's guaranteed that next image file will always have a correct "max" number' name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions