comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
50.87k stars 5.34k forks source link

[Feature request] On image save generate txt file with parameters #73

Open andzejsp opened 1 year ago

andzejsp commented 1 year ago

Would be nice that for each image that gets generated you get the parameter txt file with prompt, size, seed, cfg, samplet, steps, etc.

Another cool thing would be able to import that txt file, with drag n drop, and it populates ksampler node and the prompt node.

geeknessfr commented 1 year ago

You can use an EXIF Tool to see parameters inside each PNG File. With this tool you could see this line:

Prompt                          : {"3": {"inputs": {"seed": 648312782957426, "steps": 32, "cfg": 6.5, "sampler_name": "dpmpp_sde", "scheduler": "karras", "denoise": 1.0, "model": ["4", 0], "positive": ["6", 0], "negative": ["7", 0], "latent_image": ["5", 0]}, "class_type": "KSampler"}, "4": {"inputs": {"ckpt_name": "illuminatiDiffusionV1_v11.safetensors"}, "class_type": "CheckpointLoaderSimple"}, "5": {"inputs": {"width": 512, "height": 768, "batch_size": 1}, "class_type": "EmptyLatentImage"}, "6": {"inputs": {"text": "masterpiece best quality ...... etc....

You could use this one https://exiftool.org/ Download it and drag-and-drop PNG Files over the executable to see Exif infos. But there are others tools with graphic interfaces.

Hope that helps ;)

PS: For now with Comfy when you generate many images in one batch, the Seed is not updated for each image... I'll see if there's already an issue talking about that.

andzejsp commented 1 year ago

You can use an EXIF Tool to see parameters inside each PNG File. With this tool you could see this line:

Prompt                          : {"3": {"inputs": {"seed": 648312782957426, "steps": 32, "cfg": 6.5, "sampler_name": "dpmpp_sde", "scheduler": "karras", "denoise": 1.0, "model": ["4", 0], "positive": ["6", 0], "negative": ["7", 0], "latent_image": ["5", 0]}, "class_type": "KSampler"}, "4": {"inputs": {"ckpt_name": "illuminatiDiffusionV1_v11.safetensors"}, "class_type": "CheckpointLoaderSimple"}, "5": {"inputs": {"width": 512, "height": 768, "batch_size": 1}, "class_type": "EmptyLatentImage"}, "6": {"inputs": {"text": "masterpiece best quality ...... etc....

You could use this one https://exiftool.org/ Download it and drag-and-drop PNG Files over the executable to see Exif infos. But there are others tools with graphic interfaces.

Hope that helps ;)

PS: For now with Comfy when you generate many images in one batch, the Seed is not updated for each image... I'll see if there's already an issue talking about that.

while there are tools, and such its just unnecessary additional steps in order to get the seed or prompt from the image. 1) you have to get the tool 2) you have to drag and drop the image on the tool 3) then u get this output: image 4) then you have to copy the text output into some sort of text editor, (another tool) 5) then you have to format the json etc, just to copy the prompt :( image

i know beggars cant be choosers, therefore its a feature request. :)

geeknessfr commented 1 year ago

Wow... it's just a temporary solution lol I didn't say youre not right to ask that, I just said you COULD use another way temporarly.... Just trying to help you ^^

andzejsp commented 1 year ago

No offense, im just showing you how uncomfortable it is to get the prompts, if its not thought about at this time when the repo is in its infancy.

Another solution then would be drag n drop the rendered img on the canvas in the repo UI and it would create nodes with all the values, not sure tho how would it work tho.

Sometimes you just want to get the prompts :)

comfyanonymous commented 1 year ago

Another solution then would be drag n drop the rendered img on the canvas in the repo UI and it would create nodes with all the values, not sure tho how would it work tho.

If you drag an image onto the UI or "Load" it it will do exactly that.

angrysky56 commented 1 year ago

Comfy needs a module when you drag to it you can load the image into the workflow, not make another workflow. The module should be able to read png info into a text window and output the img to the workflow at least, ideally have options to load available params automatically from png- such as cfg, steps, samplers, upscalers, loras, model.

The img loader would be better if you could select a whole file instead of just one img too.

morphles commented 1 year ago

What? Why? First "cfg, steps" irelevant, this is A11 thinking, comfy flows can be arbitrary complex, and such simple numbers do not say much. But if you just load image, you get full workflow, so what is the problem? Also what is "whole file instead of one image"?!

angrysky56 commented 1 year ago

Yeah, I don't care about loading params much either, just some like to I know. Load a file of images so you don't have to load them one by one- have it check a folder even i.e. output, so new images are automatically loaded in and you can just click over. I don't want a different workflow, I want the one I am using to edit images.

I want to be able to drag and drop into the load image area because that is an important thing to me for ease of editing new images. 2023-05-06 (1)

2023-05-06

LIQUIDMIND111 commented 9 months ago

ANY UPDATES on how to save parameters on a TXT file so we can SEE what we use to generate an IMAGE?

angrysky56 commented 9 months ago

I found a node to do that- not sure where maybe searge or the one button prompt. image