InvokeAI
InvokeAI copied to clipboard
Undo for delete in image gallery
Is there an existing issue for this?
- [X] I have searched the existing issues
Contact Details
No response
What should this feature add?
Since it is currently not possible to get an deleted image (and its metadata) back into the gallery database by simply retrieving the deleted image(s) from the system recycle bin, an undo function for delete operations (single and multiple images) inside of the image gallery would be a nice feature.
Alternatives
No response
Additional Content
No response
This is probably a good first contribution for the backend. Maybe a bit a more complicated for the frontend, but still pretty approachable.
Backend
The images table in the db already has a deleted_at column, which was added with a view towards a future soft delete feature. We don't use it just yet.
The solution would be to update the db queries to use the deleted_at column instead of actually deleting records. All image queries would need an additional constraint checking if deleted_at is null.
We'd also need HTTP routes to un-delete an image (set its deleted_at to null).
Frontend
On the frontend, we'd need another area to the gallery that displays all deleted images, multi-select functionality and UI to un-delete them.
It's probably best to not worry about categorizing the deleted images - just paginate them. This could use a much simpler pagination and caching strategy than the rest of the gallery, which is a bit involved.
I'm happy to chat if anybody wants to raise their hand for this.
please assign me to this issue
please assign me to this issue
Can do! Are you in the Discord as well?
Joined it now
What happend with this? Is it abandoned or already implemented?
@Developer-42 The person who asked to be assigned hasn't worked on it.