Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebc71a7d72 | ||
|
|
9076b4c0ce | ||
|
|
e34d1651f7 | ||
|
|
1c0a4d5950 |
@@ -4,6 +4,8 @@ Open source comfyui deployment platform, a `vercel` for generative workflow infr
|
|||||||
|
|
||||||
Check out our latest lcoal demo -> https://github.com/comfy-deploy/comfyui-api-comfydeploy
|
Check out our latest lcoal demo -> https://github.com/comfy-deploy/comfyui-api-comfydeploy
|
||||||
|
|
||||||
|
Full backend and frontend is here -> https://github.com/comfy-deploy/comfydeploy
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Im looking for creative hacker to join ComfyDeploy's core team! DM me on [twitter](https://x.com/BennyKokMusic)
|
> Im looking for creative hacker to join ComfyDeploy's core team! DM me on [twitter](https://x.com/BennyKokMusic)
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class ComfyDeployOutputImage:
|
|||||||
"STRING",
|
"STRING",
|
||||||
{"multiline": False, "default": "output_images"},
|
{"multiline": False, "default": "output_images"},
|
||||||
),
|
),
|
||||||
|
"remove_metadata": ("BOOLEAN", {"default": True}),
|
||||||
},
|
},
|
||||||
"hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
|
"hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
|
||||||
}
|
}
|
||||||
@@ -53,6 +54,7 @@ class ComfyDeployOutputImage:
|
|||||||
output_id="output_images",
|
output_id="output_images",
|
||||||
prompt=None,
|
prompt=None,
|
||||||
extra_pnginfo=None,
|
extra_pnginfo=None,
|
||||||
|
remove_metadata=True,
|
||||||
):
|
):
|
||||||
filename_prefix += self.prefix_append
|
filename_prefix += self.prefix_append
|
||||||
full_output_folder, filename, counter, subfolder, filename_prefix = (
|
full_output_folder, filename, counter, subfolder, filename_prefix = (
|
||||||
@@ -65,11 +67,12 @@ class ComfyDeployOutputImage:
|
|||||||
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 = PngInfo()
|
||||||
if prompt is not None:
|
if not remove_metadata:
|
||||||
metadata.add_text("prompt", json.dumps(prompt))
|
if prompt is not None:
|
||||||
if extra_pnginfo is not None:
|
metadata.add_text("prompt", json.dumps(prompt))
|
||||||
for x in extra_pnginfo:
|
if extra_pnginfo is not None:
|
||||||
metadata.add_text(x, json.dumps(extra_pnginfo[x]))
|
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}"
|
||||||
|
|||||||
Reference in New Issue
Block a user