upload with privacy

This commit is contained in:
Sida Liu
2024-05-14 21:12:36 +08:00
parent a20be72c75
commit 59d88d91a2
4 changed files with 26 additions and 9 deletions
+22 -5
View File
@@ -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.
+3 -3
View File
@@ -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",
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

+1 -1
View File
@@ -85,7 +85,7 @@ class LoadImageWithPrivacy:
return True
class RemoveImage:
class RemoveImageForPrivacy:
@classmethod
def INPUT_TYPES(s):
return {