Gemini Prompt Studio (T2I+I2V) ✨
Let Gemini write your T2I and I2V prompts in one call — five personas included
- clip
- T2I_POSITIVE
- T2I_NEGATIVE
- I2V_POSITIVE
- I2V_NEGATIVE
- t2i_pos_text
- t2i_neg_text
- i2v_pos_text
- i2v_neg_text
- gemini_status
You type "a girl in a white dress by a window," and the node returns four finished conditioning outputs - a positive and negative prompt for text-to-image, plus a positive and negative tuned for image-to-video - all written by Google's Gemini and already encoded through your CLIP. That's the whole pitch of Gemini Prompt Studio (T2I+I2V) ✨, the single node in DaLongZhuaZi's ComfyUI-Gemini-Prompt-Studio pack.
It's part of the "LLM-assisted prompting" family that the community converged on: if your checkpoint's text encoder is an LLM (or even if it isn't), having a bigger LLM write your prompt is a translation between two things that speak the same language. Where most of those nodes run a local model, this one calls the Google Gemini API - so you need a key, your text leaves your machine, and each call costs a fraction of a cent. Free tier exists at AI Studio. If the words "closed API" make you flinch, it's a fair reaction; this is a convenience node, not a privacy one.
How it works
The mechanism is neat and short. The node keeps five "artist personas" hardcoded in the source - film director, art historian, game concept artist, literary critic, advertising creative director. It seeds Python's random with your seed, picks one persona at random (deterministically, so the same seed gives you the same persona), and builds an instruction in that voice demanding strict JSON with four fields: T2I and I2V, each with positive and negative. That goes to gemini-2.5-flash, gemini-2.5-pro, or gemini-2.0-flash with JSON response mode and a creative temperature of 0.9.
Whatever comes back gets a hardcoded "starter" template bolted on - (masterpiece, best quality, absurdres...) for T2I positive, the full classic negative list (deformed, bad anatomy, extra limb, mutated hands...) for T2I negative, and video-flavored ones for I2V (including static image, frozen, motionless in the negative, which is the right instinct for AnimateDiff). Then the whole string goes through your CLIP encoder into proper conditioning. If the API errors or safety filters block it, it quietly falls back to your raw keywords rather than killing the queue - the gemini_status string output tells you which of the two happened.
Inputs and outputs that matter
You'll actually touch four things:
- keywords - your core subject and scene. This is the whole creative input; the default ("a beautiful girl in a white dress, sitting by a window") is a demo, not a suggestion.
- animation_effect - how the scene moves. Optional for T2I, but it's what makes the I2V half worth having.
- seed - controls both the persona pick and the prompt randomness, so results reproduce.
- model_name - just leave it on
gemini-2.5-flash. It's the recommended one for a reason.
clip is required and api_key defaults to the GEMINI_API_KEY environment variable if set - use that instead of pasting a key into the widget, because the widget key gets baked into your workflow JSON and will leak if you share the file.
Outputs: T2I_POSITIVE and T2I_NEGATIVE go to KSampler's positive/negative; I2V_POSITIVE and I2V_NEGATIVE go to your AnimateDiff/SVD conditioning. The four *_text outputs are just the raw strings for previewing, and gemini_status is your error report.
Install
ComfyUI Manager → search "Gemini Prompt Studio" → Install, or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/DaLongZhuaZi/ComfyUI-Gemini-Prompt-Studio.git
cd ComfyUI-Gemini-Prompt-Studio
pip install -r requirements.txt
The only real dependency is google-generativeai; no model files download because there's nothing local to download. Restart, grab a key from aistudio.google.com/apikey, and go.
Where people get burned
Three things to know before you wire this into a saved workflow. First, the "starter" templates are pure SDXL dialect - (word:1.2) weights and "masterpiece, best quality" are inert or worse on LLM-encoded checkpoints like Flux or Z-Image, where weight syntax passes through as literal punctuation. This node is aimed at CLIP-era models; run it into an SDXL or Illustrious checkpoint and it sings, run it into Flux and the starter text is noise. Second, Gemini's safety filters can return an empty response on content it doesn't like - the node surfaces the block reason in gemini_status, and rewording usually fixes it. Third, don't forget the ModuleNotFoundError: google.generativeai trap after a fresh install - that's just the pip step you skipped.
It's a single trick, but it's a good one: one node, two model families covered, reproducible variety via seed. For a beginner it turns "what do I even write?" into "how does the window look," and that's usually the harder half of the problem.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| api_key | STRING | — | |
| model_name | COMBO | 3 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flash | |
| keywords | STRING | A beautiful girl in a white dress, sitting by a window | — |
| animation_effect | STRING | She slowly turns her head to look at the camera, a gentle smile appears, wind blows her hair slightly | — |
| seed | INT | 00–18446744073709550000 | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| T2I_POSITIVE | CONDITIONING | — |
| T2I_NEGATIVE | CONDITIONING | — |
| I2V_POSITIVE | CONDITIONING | — |
| I2V_NEGATIVE | CONDITIONING | — |
| t2i_pos_text | STRING | — |
| t2i_neg_text | STRING | — |
| i2v_pos_text | STRING | — |
| i2v_neg_text | STRING | — |
| gemini_status | STRING | — |