Sign In

Workflow and Prompt to PNG

2
Workflow and Prompt to PNG

If you edit your ComfyUI-generated image in Photoshop, you lost all PNG metadata (prompt, workflow) -- so, you can't load them as workflow anymore. This script allow you to inject metadata back in PNG file (by creating new PNG file with workflow and prompt inside).

----- How To Use ----- (script and example files in attached zip)

1) --- Get 'prompt' data: ---

Load your ComfyUI-generated image to -- https://www.nayuki.io/page/png-file-chunk-inspector

and copy data from section "keyword: prompt" starting from {"1": ... and ending with ... }}

Paste data in prompt.txt

2) --- Put into C:\Temp ---

image.png

prompt.txt

workflow.json

workflow2png.py

___ and run workflow2png.py by double click.

Created file image_workflow_prompt.png -- has include your prompt and workflow!

***You can test your file in "Stable Diffusion Prompt Extractor" -- https://i210i.github.io/

2

Comments