Compare commits

...
Author SHA1 Message Date
KarrixLee 60c93b65f4 bump version to v2.3.8 2025-09-22 18:32:27 +08:00
KarrixLee 5d2ade4fd4 Karrix/add remove metadata boolean in save image (#109)
* fix: remove metadata in output node

* set to true

* refactor
2025-09-22 18:18:40 +08:00
2 changed files with 10 additions and 7 deletions
+9 -6
View File
@@ -4,6 +4,7 @@ import numpy as np
from PIL import Image from PIL import Image
from PIL.PngImagePlugin import PngInfo from PIL.PngImagePlugin import PngInfo
import folder_paths import folder_paths
from comfy.cli_args import args
class ComfyDeployOutputImage: class ComfyDeployOutputImage:
@@ -64,12 +65,14 @@ class ComfyDeployOutputImage:
for batch_number, image in enumerate(images): for batch_number, image in enumerate(images):
i = 255.0 * image.cpu().numpy() i = 255.0 * image.cpu().numpy()
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8)) img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
metadata = PngInfo() metadata = None
if prompt is not None: if not args.disable_metadata:
metadata.add_text("prompt", json.dumps(prompt)) metadata = PngInfo()
if extra_pnginfo is not None: if prompt is not None:
for x in extra_pnginfo: metadata.add_text("prompt", json.dumps(prompt))
metadata.add_text(x, json.dumps(extra_pnginfo[x])) if extra_pnginfo is not None:
for x in extra_pnginfo:
metadata.add_text(x, json.dumps(extra_pnginfo[x]))
filename_with_batch_num = filename.replace("%batch_num%", str(batch_number)) filename_with_batch_num = filename.replace("%batch_num%", str(batch_number))
file = f"{filename_with_batch_num}_{counter:05}_.{file_type}" file = f"{filename_with_batch_num}_{counter:05}_.{file_type}"
+1 -1
View File
@@ -1,7 +1,7 @@
[project] [project]
name = "comfyui-deploy" name = "comfyui-deploy"
description = "Open source comfyui deployment platform, a vercel for generative workflow infra." description = "Open source comfyui deployment platform, a vercel for generative workflow infra."
version = "2.3.7" version = "2.3.8"
license = { file = "LICENSE" } license = { file = "LICENSE" }
dependencies = ["aiofiles", "pydantic", "opencv-python", "imageio-ffmpeg", "tabulate", "brotli"] dependencies = ["aiofiles", "pydantic", "opencv-python", "imageio-ffmpeg", "tabulate", "brotli"]