feat: add support for gif upload

This commit is contained in:
BennyKok
2024-01-11 23:14:06 +08:00
parent e65fa70503
commit fce77b905c
4 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ class ComfyUIDeployExternalImage:
print("Fetching image from url: ", input_id)
response = requests.get(input_id)
image = Image.open(BytesIO(response.content))
elif input_id.startswith('data:image/png;base64,'):
elif input_id.startswith('data:image/png;base64,') or input_id.startswith('data:image/jpeg;base64,') or input_id.startswith('data:image/jpg;base64,'):
import base64
from io import BytesIO
print("Decoding base64 image")
+1 -1
View File
@@ -34,7 +34,7 @@ class ComfyUIDeployExternalImageAlpha:
print("Fetching image from url: ", input_id)
response = requests.get(input_id)
image = Image.open(BytesIO(response.content))
elif input_id.startswith('data:image/png;base64,'):
elif input_id.startswith('data:image/png;base64,') or input_id.startswith('data:image/jpeg;base64,') or input_id.startswith('data:image/jpg;base64,'):
import base64
from io import BytesIO
print("Decoding base64 image")