InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Deleted files are not removed from disk and not marked as deleted

Open jaypikay opened this issue 1 year ago • 3 comments

Is there an existing issue for this problem?

  • [x] I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

RTX 4090

GPU VRAM

24

Version number

5.6.2

Browser

135.0

Python dependencies

No response

What happened

When clicking on delete, to remove an image, it will be removed from the gallery/boards, the deleted_at is not set. The image will only be unlinked from any Board relations. The files remain on the local dist in outputs/images and output/images/thumbnails.

Trying other options, like purging the cache does not have an effect either.

The files are garbage files, or black images from the canvas.

What you expected to happen

Deleting a file should either mark them as deleted (the trash bin feature) or remove them from the database and disk storage.

How to reproduce the problem

No response

Additional context

SELECT * FROM images 
WHERE NOT (EXISTS (SELECT * FROM board_images WHERE board_images.image_name = images.image_name))

Lists all the images not associated to any boards and were deleted by the user.

I have around ~685 unused images stored on my storage and possibly wasted space.

Discord username

No response

jaypikay avatar Feb 20 '25 10:02 jaypikay

It sounds like the button you are looking for is in the main app settings - clear intermediates.

psychedelicious avatar Feb 20 '25 19:02 psychedelicious

Ah, perfect that's it. Thank you.

jaypikay avatar Feb 21 '25 07:02 jaypikay

It sounds like the button you are looking for is in the main app settings - clear intermediates.

Thank you :)

daxime avatar Mar 07 '25 15:03 daxime