Nodes/ComfyUI_LayerStyle_Advance/LayerUtility: PromptEmbellish(Advance)
ComfyUI Node Runs on cloud

LayerUtility: PromptEmbellish(Advance)

PromptEmbellish — turn a rough idea into a full prompt (via Gemini)

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: PromptEmbellish(Advance)
  • image
  • text
api
token_limit40
describe

The name doesn't mention it, but this is another Gemini-backed node - same API-key setup as Gemini, GeminiV2, and GeminiImageEdit elsewhere in this pack, just aimed at a narrower job: take a short, plain description and have the model expand it into a fuller, more usable Stable Diffusion prompt. It also takes an optional reference image and, per the README, supports Chinese-language input directly - a genuinely useful detail if your first-draft ideas aren't in English and you don't want to hand-translate before prompting.

The inputs and outputs that matter

  • describe - your rough idea, multiline, Chinese input supported.
  • api - gemini-1.5-flash or gemini-pro-vision.
  • token_limit (default 40, max 1024) - this is the one that trips people up. 40 tokens is short - barely more than a sentence or two - so if your embellished output looks abruptly cut off, this is almost certainly why. Raise it well before assuming something else is wrong.
  • image (optional) - a reference image the model can describe or draw from while embellishing your text.

Output is a single text - the polished prompt.

How to install it

Recommended: ComfyUI Manager, search "ComfyUI Layer Style Advance". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git

Then install_requirements.bat / install_requirements_aki.bat, or pip install -r requirements.txt plus repair_dependency.bat. Restart. No local model - this calls out to Google's API.

API key: apply at Google AI Studio, then rename api_key.ini.example (plugin root directory) to api_key.ini and fill in your key after google_api_key=. If you've already set this up for any other Gemini node in the pack, this one reads the same file - nothing extra to configure.

Common issues & troubleshooting

Output is truncated mid-sentence. This is almost always the token_limit default of 40 - it's noticeably lower than the 200-word default on the pack's GeminiV2 node, and it's easy to not notice until your embellished prompt just stops. Push it up toward the 1024 ceiling for anything longer than a quick phrase.

Authentication errors. Check api_key.ini is actually renamed from .ini.example, and that the key itself has no stray leading/trailing whitespace.

Connection failures or ProxyError. Google's endpoints aren't reachable directly from some regions - the README specifically calls out mainland China. That's a network-routing issue outside the node's control, not a bug to chase down in the plugin.

Output ignores your Chinese input, or comes back in the wrong language. This node doesn't have a response_language control the way GeminiV2 does - there's nothing in the schema to force output language here. If you need explicit control over which language comes back, GeminiV2 is the node with that knob; this one just embellishes whatever you send it.

Category😺dzNodes/LayerUtility/Prompt

Inputs (4)

NameTypeDefaultDescription
apiCOMBO2 options: gemini-1.5-flash, gemini-pro-vision
token_limitINT402–1024
describeSTRING
imageoptIMAGE

Outputs (1)

NameTypeDescription
textSTRING