mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(app): delete model_images instead of using send2trash
This commit is contained in:
parent
08993c0d29
commit
6c4cf58a31
@ -2,7 +2,6 @@ from pathlib import Path
|
|||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from PIL.Image import Image as PILImageType
|
from PIL.Image import Image as PILImageType
|
||||||
from send2trash import send2trash
|
|
||||||
|
|
||||||
from invokeai.app.services.invoker import Invoker
|
from invokeai.app.services.invoker import Invoker
|
||||||
from invokeai.app.services.model_images.model_images_base import ModelImageFileStorageBase
|
from invokeai.app.services.model_images.model_images_base import ModelImageFileStorageBase
|
||||||
@ -70,7 +69,7 @@ class ModelImageFileStorageDisk(ModelImageFileStorageBase):
|
|||||||
if not self._validate_path(path):
|
if not self._validate_path(path):
|
||||||
raise ModelImageFileNotFoundException
|
raise ModelImageFileNotFoundException
|
||||||
|
|
||||||
send2trash(path)
|
path.unlink()
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ModelImageFileDeleteException from e
|
raise ModelImageFileDeleteException from e
|
||||||
|
Loading…
Reference in New Issue
Block a user