Nodes/ComfyUI-ZMongo/10 Caption Pack Generator
ComfyUI Node

10 Caption Pack Generator

Turn a generation into a ready-to-post caption — ZMongo 10 Caption Pack Generator

By CentralFloridaAttorney·Created 5 months ago·Updated 2 months ago· 1
10 Caption Pack Generator
  • text_agent_config
  • caption_text
  • json
  • ledger_document_id
  • success
source_prompt
context_pack
platformYouTube Shorts
toneclear, energetic, non-clickbait
save_to_ledgertrue
refresh_token

10 Caption Pack Generator is the publishing node in ZMongo's text-agent layer: it takes the prompt (and optionally a context pack) behind an image or video you generated, asks Gemini to write the whole social post - title options, short caption, description, hashtags, alt text, plus an internal note - and returns it as one caption_text string. It's the "I made the thing, now help me post the thing" node.

If you batch-generate content, captions are the tedious tax on top of the actual work. This node is ZMongo's attempt to make that step one node instead of twenty minutes of copywriting. It's opinionated about platform and tone so you can tune it to YouTube Shorts vs. Instagram vs. whatever, and it defaults to a refreshingly non-clickbait tone.

How it works

It needs a text_agent_config from 07 Text Agent Session (which bundles your session, model, project, and collection names). Give it a source_prompt - the prompt you generated with - and it:

  1. Builds a prompt asking Gemini for a structured caption pack: title options, short caption, description, hashtags/tags, alt text, and a one-line internal note about what memory should be saved.
  2. Optionally injects a context_pack (from 10 Build Context Pack) so the captions stay consistent with your project history.
  3. Folds in the platform (default "YouTube Shorts") and tone (default "clear, energetic, non-clickbait") as instructions.
  4. If save_to_ledger is on (default true), saves the whole pack to the ledger collection and returns its ID.

Outputs: caption_text (the finished text), json (the payload), ledger_document_id (if saved), and success.

The inputs that matter

  • text_agent_config - required; wire from 07 Text Agent Session.
  • source_prompt - required; the prompt you generated with.
  • context_pack - optional; paste a context pack to keep tone/consistency.
  • platform, tone - the two levers that shape the output.
  • save_to_ledger - keep on if you want a searchable history of what you posted and why.

Install

Standard:

cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
cd ComfyUI-ZMongo
pip install -r requirements.txt

or ComfyUI Manager → "ComfyUI-ZMongo" → restart. It needs a Gemini-capable session, so configure your API key and make sure google-genai installed with the pack.

Troubleshooting

  • success: false and empty caption_text - Gemini failed. Check the session/key and the model in 07 Text Agent Session; json carries the error.
  • Captions feel generic - feed it a context_pack or a richer source_prompt. Garbage in, generic out; the node can only editorialize what you give it.
  • Hashtags/platform don't match - you're on a different platform than the default. Set platform explicitly.
  • ledger_document_id empty - either save_to_ledger is off or the ledger write failed; check json.

Caption Pack Generator is the pay-off node in the text-agent stack - the one that converts a finished generation into something you can actually post. It won't write your personality, but it'll clear the blank-page tax.

CategoryZMongo/07 Text Agents/Publishing

Inputs (7)

NameTypeDefaultDescription
text_agent_configZMONGO_TEXT_AGENT_CONFIG
source_promptSTRING
context_packoptSTRING
platformoptSTRINGYouTube Shorts
toneoptSTRINGclear, energetic, non-clickbait
save_to_ledgeroptBOOLEANtrue
refresh_tokenoptSTRING

Outputs (4)

NameTypeDescription
caption_textSTRING
jsonSTRING
ledger_document_idSTRING
successBOOLEAN