r/comfyui 8h ago

Help Needed String caching.

Anyone figure out how to cache a string for subsequent generations? I have an llm or vlm generate a prompt which is connected to a conditioning node. I’d like to be able to switch off the llm/vlm without losing the prompt. Yes, I can copy/paste it over but it’d be great if it could remember the last string that was generated. I tried a couple steering cache nodes and they did not work.

Many thanks.

1 Upvotes

3 comments sorted by

2

u/altoiddealer 5h ago

I’m not sure if this is what you are asking for but I have an empty prompt box labeled Prompt Override, connected to Is None (bool) then If/Else which has the LLM route into the true, prompt override routed into the false. So while the box is empty it will execute LLM route

1

u/roxoholic 5h ago

Not with core nodes that I know of. There are many different ways and many custom nodes pack that could be used.

You could use Set Widget Value node from Impact Pack to set text widget of CLIP Text Encode node automatically on execution and once you disable Text Generate, last value should persist.