mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Delete sends img to trash instead of delete
This commit is contained in:
parent
20ba51ce7d
commit
b74354795d
@ -15,6 +15,7 @@ from PIL import Image
|
|||||||
from pytorch_lightning import logging
|
from pytorch_lightning import logging
|
||||||
from threading import Event
|
from threading import Event
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
from send2trash import send2trash
|
||||||
|
|
||||||
from ldm.gfpgan.gfpgan_tools import real_esrgan_upscale
|
from ldm.gfpgan.gfpgan_tools import real_esrgan_upscale
|
||||||
from ldm.gfpgan.gfpgan_tools import run_gfpgan
|
from ldm.gfpgan.gfpgan_tools import run_gfpgan
|
||||||
@ -228,7 +229,7 @@ def handle_cancel():
|
|||||||
@socketio.on('deleteImage')
|
@socketio.on('deleteImage')
|
||||||
def handle_delete_image(path):
|
def handle_delete_image(path):
|
||||||
print(f'>> Delete requested "{path}"')
|
print(f'>> Delete requested "{path}"')
|
||||||
Path(path).unlink()
|
send2trash(path)
|
||||||
return make_response("OK")
|
return make_response("OK")
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ dependencies:
|
|||||||
- opencv-python==4.6.0
|
- opencv-python==4.6.0
|
||||||
- protobuf==3.20.1
|
- protobuf==3.20.1
|
||||||
- realesrgan==0.2.5.0
|
- realesrgan==0.2.5.0
|
||||||
|
- send2trash==1.8.0
|
||||||
- test-tube==0.7.5
|
- test-tube==0.7.5
|
||||||
- transformers==4.21.2
|
- transformers==4.21.2
|
||||||
- torch-fidelity==0.3.0
|
- torch-fidelity==0.3.0
|
||||||
|
@ -20,6 +20,7 @@ dependencies:
|
|||||||
- realesrgan==0.2.5.0
|
- realesrgan==0.2.5.0
|
||||||
- test-tube>=0.7.5
|
- test-tube>=0.7.5
|
||||||
- streamlit==1.12.0
|
- streamlit==1.12.0
|
||||||
|
- send2trash==1.8.0
|
||||||
- pillow==6.2.0
|
- pillow==6.2.0
|
||||||
- einops==0.3.0
|
- einops==0.3.0
|
||||||
- torch-fidelity==0.3.0
|
- torch-fidelity==0.3.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user