From 0cd7cdb52e42ef31de6b104c082daad1e439723a Mon Sep 17 00:00:00 2001 From: Mary Hipp Date: Thu, 8 Aug 2024 15:13:36 -0400 Subject: [PATCH] remove send2trash --- .../style_preset_images/style_preset_images_default.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/invokeai/app/services/style_preset_images/style_preset_images_default.py b/invokeai/app/services/style_preset_images/style_preset_images_default.py index 3efcdaf610..4cffd183cd 100644 --- a/invokeai/app/services/style_preset_images/style_preset_images_default.py +++ b/invokeai/app/services/style_preset_images/style_preset_images_default.py @@ -2,7 +2,6 @@ from pathlib import Path from PIL import Image from PIL.Image import Image as PILImageType -from send2trash import send2trash from invokeai.app.services.invoker import Invoker from invokeai.app.services.style_preset_images.style_preset_images_base import StylePresetImageFileStorageBase @@ -70,7 +69,7 @@ class StylePresetImageFileStorageDisk(StylePresetImageFileStorageBase): if not self._validate_path(path): raise StylePresetImageFileNotFoundException - send2trash(path) + path.unlink() except StylePresetImageFileNotFoundException as e: raise StylePresetImageFileNotFoundException from e