Compare commits

...
Author SHA1 Message Date
KarrixLee a4e3bc2571 bump version to v2.3.9 2025-10-10 21:27:38 +08:00
KarrixLee bf8e2a17b9 Enhance node handling in send_json_override: normalize dotted display IDs and improve logging for unknown nodes 2025-10-10 21:14:20 +08:00
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
3 changed files with 27 additions and 15 deletions
+9 -6
View File
@@ -4,6 +4,7 @@ import numpy as np
from PIL import Image
from PIL.PngImagePlugin import PngInfo
import folder_paths
from comfy.cli_args import args
class ComfyDeployOutputImage:
@@ -64,12 +65,14 @@ class ComfyDeployOutputImage:
for batch_number, image in enumerate(images):
i = 255.0 * image.cpu().numpy()
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
metadata = PngInfo()
if prompt is not None:
metadata.add_text("prompt", json.dumps(prompt))
if extra_pnginfo is not None:
for x in extra_pnginfo:
metadata.add_text(x, json.dumps(extra_pnginfo[x]))
metadata = None
if not args.disable_metadata:
metadata = PngInfo()
if prompt is not None:
metadata.add_text("prompt", json.dumps(prompt))
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))
file = f"{filename_with_batch_num}_{counter:05}_.{file_type}"
+17 -8
View File
@@ -1554,18 +1554,26 @@ async def send_json_override(self, event, data, sid=None):
)
if event == "executing" and data.get("node") is not None:
node = data.get("node")
raw_node = data.get("node")
node = str(raw_node)
if prompt_id in prompt_metadata:
# if 'progress' not in prompt_metadata[prompt_id]:
# prompt_metadata[prompt_id]["progress"] = set()
wf_api = prompt_metadata[prompt_id].workflow_api
# Normalize dotted display ids like "23.0.0.1" to base "23"
if node not in wf_api and "." in node:
base = node.split(".")[0]
if base in wf_api:
node = base
# If still unknown, skip safely
if node not in wf_api:
logger.info(f"Skipping unknown node id in 'executing': {raw_node}")
return
prompt_metadata[prompt_id].progress.add(node)
calculated_progress = len(prompt_metadata[prompt_id].progress) / len(
prompt_metadata[prompt_id].workflow_api
)
calculated_progress = len(prompt_metadata[prompt_id].progress) / len(wf_api)
calculated_progress = round(calculated_progress, 2)
# logger.info("calculated_progress", calculated_progress)
if (
prompt_metadata[prompt_id].last_updated_node is not None
@@ -1573,7 +1581,8 @@ async def send_json_override(self, event, data, sid=None):
):
return
prompt_metadata[prompt_id].last_updated_node = node
class_type = prompt_metadata[prompt_id].workflow_api[node]["class_type"]
class_type = wf_api[node]["class_type"]
logger.info(f"At: {round(calculated_progress * 100)}% - {class_type}")
asyncio.create_task(
send(
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-deploy"
description = "Open source comfyui deployment platform, a vercel for generative workflow infra."
version = "2.3.7"
version = "2.3.9"
license = { file = "LICENSE" }
dependencies = ["aiofiles", "pydantic", "opencv-python", "imageio-ffmpeg", "tabulate", "brotli"]