Nodes/Comfyui-zhenzhen/Zhenzhen LLM API
ComfyUI Node

Zhenzhen LLM API

Prompt expansion and image/video captioning through one API call

By T8mars·Created about a year ago·Updated 2 days ago· 740
Zhenzhen LLM API
  • ref_image
  • video
  • describe
api_baseurlhttps://ai.t8star.org/v1
api_key
modelgemini-3-pro-preview
roleYou are a helpful assistant
promptdescribe the image
temperature0.60
seed100
skip_errorfalse

Every other node in this pack turns a prompt into pixels or video. This one goes the other way - it turns your rough idea into a better prompt, or turns an image or video into a description. It's a plain LLM/VLM chat node with vision, wired to an OpenAI-compatible endpoint, and it's the node you put before a generator when you want an LLM to write the prompt for it.

The default prompt is literally "describe the image" and the default model is gemini-3-pro-preview - so the intended job is clear: feed it a ref_image (or a video) and get a detailed caption back, then feed that caption into your generator. That's the classic caption→enhance→generate pipeline the community converged on for prompt quality (llm-in-comfyui.md calls it "two tightly-scoped steps drift less than one open-ended one"). Because it's an API call, you get frontier-chat quality without a 32B model eating your VRAM - with the usual caveats: it costs per call and it's censored.

How it works

It's a chat-completions call with vision. The node talks to api_baseurl (default https://ai.t8star.org/v1 - an OpenAI-compatible endpoint) using the OpenAI client library, sending your role + prompt as messages. If video is connected, the clip is base64-encoded and sent as a video_url content block; otherwise ref_image is sent as an image block. The model's text reply comes back on the single describe output (a STRING).

The model is a free-text field, not a dropdown - you can type any model the site serves. The changelog's advice: pick models with a vision tag if you want image/video captioning, and note the model list lives on the site's pricing page, not in the node.

Inputs that matter

  • api_baseurl - defaults to Zhenzhen's endpoint. You can point it anywhere OpenAI-compatible, which makes this node useful beyond the pack.
  • api_key - required; empty key means the call fails. It's the only node in the pack where the key is a plain required field next to the URL.
  • model - the model name. gemini-3-pro-preview by default; swap to whatever the site offers with the right vision tag for your job.
  • role - the system prompt. Default "You are a helpful assistant"; for prompt expansion, this is where you'd say "you are a prompt engineer writing detailed video prompts."
  • prompt - the instruction. temperature - 0.6 default; lower for more deterministic captioning. seed - a real LLM seed here, unlike the pack's cache-only seeds.
  • ref_image / video - the vision inputs. Video wins over image if both are connected.

Installing it

Manager → search Comfyui-zhenzhen → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen

Restart. The node uses the openai Python package (it's in the pack's requirements), so if you get an import error, pip install openai in your ComfyUI environment. Then paste your key and pick a model.

Common issues

  • "OpenAI package not installed" - the openai library is missing; install it and restart.
  • Captioning returns text but not what's in the image - vision-language models mix up multi-subject attribution (llm-in-comfyui.md calls it "the weakness every captioner shares"); for a single subject it's reliable, for two people in a frame, audit the result.
  • Model not answering about the image - you probably picked a model without a vision tag. Check the site's model list for the 识图 (image-recognition) tag.
  • The pack standard gotchas - 443/VPN-in-TUN-mode for overseas servers, and vendor 500s that just need a re-run.

The honest limit: this is a captioner and prompt-improver, not a creative writer. It removes the blank-page problem and hands your generator a structured prompt - the generation quality is still up to the model after it.

Categoryzhenzhen/LLM

Inputs (10)

NameTypeDefaultDescription
api_baseurlSTRINGhttps://ai.t8star.org/v1
api_keySTRING
modelSTRINGgemini-3-pro-preview
roleSTRINGYou are a helpful assistant
promptSTRINGdescribe the image
temperatureFLOAT0.60
seedINT100
ref_imageoptIMAGE
videooptVIDEO
skip_erroroptBOOLEANfalse开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。

Outputs (1)

NameTypeDescription
describeSTRING