Closed maxwell1755 closed 4 months ago
While waiting for a fix, you can create a copy of your DB and try the following if you like. I needed to update the created date on quite a few images. Note that it appears as though the created date in the program is the date the picture was added to the DB, not the date of the picture creation itself. I have noticed this as I add generations to the program usually the day after I generate them and they are in folders named the date I generated them. Edit: Regarding comments about file creation date the program uses, forgot I copy files to another folder the day or so after and so creation date of imported images would change.
In a SQL DB browser (I use SQLiteDatabaseBrowserPortable) open your backed up database.
Dates aren't stored in regular format so you need to convert it to the correct format using the following:
SELECT (CAST((((JulianDay('<year>-<month>-<date> <hr>:<min>:<sec>') - 2440587.5)*86400.0) + 62135596800) * 10000000 AS BIGINT))
Make a note of the result.
Look through your database Image table and make a note of the ID numbers of the images you want to give the value found above. Then run the following:
UPDATE Image
SET CreatedDate = '<number>'
Where Id between <first image> and <last image>;
I use File.GetCreationTime
to set the CreatedDate, so I'm getting the value reported by the filesystem, not the current date that I am adding the file.
CreatedDate = File.GetCreationTime(file.Path),
I use
File.GetCreationTime
to set the CreatedDate, so I'm getting the value reported by the filesystem, not the current date that I am adding the file.CreatedDate = File.GetCreationTime(file.Path),
Ah my bad. Forgot I copy the images to another folder the day after creation and it's that folder that the program scrapes. My apologies!
This should be implemented in the latest version
Is your feature request related to a problem? Please describe. Since most of my images were made on a mobile device, I had to FTP them to my PC. This overwrites the date created, but preserves the date modified. Since DiffusionToolkit only supports date created at the moment, this means my images are all in a random order.
Describe the solution you'd like An option in the "Sort by:" field for date modified.
Describe alternatives you've considered I've looked into modifying the date created to match the date modified in batch, but this seems to be more difficult than expected. using USB to transfer the images takes too long because the type-c port on my phone is too slow.