Sign In

The prompt archiver (a better way to save prompts)

14

Dec 17, 2024

tool guide
The prompt archiver (a better way to save prompts)

A few weeks ago i proudly wrote an article on how I saved my prompts in a txt file, which worked BUT it can be better.

for those who know I am making workflows with Griptape agents, for those who don't TLDR: I call upon LLM's to perform tasks for me, like analysing and image and giving a description, running that intel to a prompt creator agent and making an image that looks a lot like the original:
e.g. The original

The reboot

BUT the problem was that the prompts that are attached in the image nodes are those from a previous image again TLDR: You punch in a few images and queue them, the prompts do not exist yet, but the workflow will take the one available and put the wrong prompt in to the image.

So I figured I needed to get my prompts written down in to a txt-file and used the PYSSS node to save text. SO I would at least have a list of cool prompts

BUT, yes another but, It saved EVERY prompt and if you queue 4 images at a time, you get 4 of the same prompts, and since they are very lengthy prompts, If you want to clean that file of excess double prompts, you have a long read and work ahead of you. So it was not the best solution.

I needed another solution, untill it hit me, you are using agents and LLM's dummy why don't you make an archiver and now we come to the latest solution, MY PROMPT ARCHIVER agent:

I gave the agent the txt file it needs to adapt, and a set of rules, like only add if it is new and separate with a line of underscores (the long bottom dash)


So that it what it does and yes you still have to copy and paste that thing in your workflow or find a way to read those prompts with your agents, I am not that far yet.

Yes those are very lengthy prompts, if you want to recreate an image you need a lot of info, like scene, lighting, clothing, colorscheme etc.... But just keep in mind this is a summary of what the LLM found out about the original image, limited to 500 tokens, So these prompts are very detailed but still relatively short enough for other chkpts like pony, SDXL etc...

things to fix:
- Make sure that it does not overwrite the txt file with a new one every time I restart comfy
- keep the comments like "here is a prompt limited to 500 tokens for this....", The AI doesn't mind
but it is unnecessary

TLDR: Want prompts? get attached file and have fun

14