diff --git a/README.md b/README.md index a45bb7b..d188d62 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,26 @@ You have two options to validate your call: Feel free to modify `login.html` if you want to personalize your login page. -## HTTPS? +# Upload Privacy Nodes -Now ComfyUI officially supports self-signed SSL certificates (though Chrome might -display a warning for them). Please check [How To Use -TLS/SSL](https://github.com/comfyanonymous/ComfyUI?tab=readme-ov-file#how-to-use-tlsssl) -section. +This package now contains two nodes that contribute to privacy. + +When using ComfyUI's API to serve customers, people often ask if the uploaded pictures will be destroyed after processing. The answer was no, and it's not easy, because there's no "remove image" node for security considerations. + +Now we have two nodes for this: + +![Load Image with Privacy and Remove Image for Privacy node](upload_privacy.png) + +1. Load Image with Privacy + +This node not only loads an image, but also returns the path of the image and a calculated signature for the path. + +2. Remove Image for Privacy + +This node will remove the image if the signature for the path of the image is correct. + +## Before Using the Nodes + +Please set the `REMOVE_IMAGE_SECRET` in `upload_privacy.py`, so that your signature will be unique and secure. + +These two nodes are mainly for API use, because I assume that people don't need to remove any images in the GUI. But who knows. diff --git a/__init__.py b/__init__.py index 38c3a36..6a459be 100644 --- a/__init__.py +++ b/__init__.py @@ -3,10 +3,10 @@ from .password import * NODE_CLASS_MAPPINGS = { "LoadImageWithPrivacy": LoadImageWithPrivacy, - "RemoveImage": RemoveImage, + "RemoveImageForPrivacy": RemoveImageForPrivacy, } NODE_DISPLAY_NAME_MAPPINGS = { - "LoadImageWithPrivacy": "Load Image With Privacy", - "RemoveImage": "Remove Image", + "LoadImageWithPrivacy": "Load Image with Privacy", + "RemoveImageForPrivacy": "Remove Image for Privacy", } diff --git a/upload_privacy.png b/upload_privacy.png new file mode 100644 index 0000000..e43178c Binary files /dev/null and b/upload_privacy.png differ diff --git a/upload_privacy.py b/upload_privacy.py index 7e94537..0721cd3 100644 --- a/upload_privacy.py +++ b/upload_privacy.py @@ -85,7 +85,7 @@ class LoadImageWithPrivacy: return True -class RemoveImage: +class RemoveImageForPrivacy: @classmethod def INPUT_TYPES(s): return {