扩写高质量提示词 (Comfly/T8)
Point it at an image, get a model-ready prompt back
- image
- expanded_prompt
You've got a reference image and you want a proper prompt for Flux, LTX, or whatever base you're running - the kind of comma-separated, detail-loaded prompt that actually steers a model instead of vague hand-waving. This node is that shortcut: give it an image (or an image URL), it sends the image to a vision LLM on a Comfly/T8 mirror API, and out comes a polished English prompt. "扩写高质量提示词" is the display name, which translates roughly to "expand high-quality prompt," and that's exactly the job.
It belongs to the Comfly/T8 family inside ComfyUI_LLM_Banana, so it's an API-wrapper node rather than a local one. No weights to download, no VRAM - but the image and prompt go over the wire to a third-party service, and the call costs you whatever your mirror charges.
How it works
Same machinery as the sibling Comfly_First_Last_Frame_Prompt: the image gets base64-encoded and POSTed to {base_url}/chat/completions with a Bearer key. What's different is the prompt construction - the node comes with an image_prompt_preset dropdown that swaps in a tailored system prompt, so the output is shaped for your target rather than generic.
The inputs that matter
image_prompt_preset- the six presets are the real feature: 通用高质量英文描述 (generic high-quality English description), Flux描述 (Flux), 视频描述 (video), Flux Kontext, 海报设计 (poster design), 表情包设计绘图 (meme/sticker design). Pick the one that matches where the prompt is headed. The Flux and Flux Kontext presets matter because those models want their own prompt dialect.image- optional IMAGE wire, if you're pulling from a Load Image node.image_url/ref_image- alternatives to the IMAGE wire, for when your source is a URL or a text path.user_promptanduser_requirement- one adds content ("there's a red car in the foreground"), the other adds style constraints.api_provider,api_key,base_url- the Comfly/T8 mirror plumbing, same as its sibling node.
Output is a single expanded_prompt STRING. That's your text-to-image prompt, so wire it into the CLIP/text-encode stage of your generation workflow.
Install
Via ComfyUI Manager (search ComfyUI_LLM_Banana) or:
cd ComfyUI/custom_nodes
git clone https://github.com/xuchenxu168/ComfyUI_LLM_Banana
cd ComfyUI_LLM_Banana
pip install -r requirements.txt
Then restart. The dependency list is heavy - transformers, opencv-python, google-genai, openai, httpx and friends.
Gotchas
If the node spits out an error string in place of a prompt ("未检测到API Key或Base URL…"), your key/base URL aren't resolving - configure ChatFly_config.json under prompt_api_providers, or fill the node's fields. And the usual caveat for this whole pack: it's a fresh-ish Chinese-community pack with near-zero English reddit footprint, so treat it as a convenience tool rather than a vetted institution, and don't leave a real API key lying around in shared workflows.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| api_provider | COMBO | Comfly | 7 options: Comfly, Comfly-HK, Comfly-US, T8的贞贞AI工坊, T8-Comfly, T8-HK, +1 |
| image_prompt_preset | COMBO | 通用高质量英文描述 | 6 options: 通用高质量英文描述, Flux描述, 视频描述, Flux Kontext, 海报设计提示词, 表情包设计绘图提示词 |
| base_url | STRING | — | |
| api_key | STRING | — | |
| model | COMBO | gpt-4-v | 28 options: gpt-4-v, gpt-4o-all, gpt-4-all, gpt-4o, gpt-4o-mini, gpt-4o-mini-2024-07-18, +22 |
| system_prompt | STRING | ## 角色设定 (System Role): 你是一名专业的图像描述专家。你的任务是将图片内容转化为高质量的英文提示词,用于文本到图像的生成模型。 ## 任务说明 (User Instruction): 请仔细观察提供的图片,并生成一段详细、具体、富有创造性的英文短语,描述图片中的主体对象、场景、动作、光线、材质、色彩、构图和艺术风格。 ## 输出要求 (Output Requirements): ** **语言**: 严格使用英文。 ** **细节**: 尽可能多地描绘图片细节,包括但不限于物体、人物、背景、前景、纹理、表情、动作、服装、道具等。 ** **角度**: 尽可能从多个角度丰富描述,例如特写、广角、俯视、仰视等,但不要直接写“角度”。 ** **连接**: 使用逗号(,)连接不同的短语,形成一个连贯的提示词。 ** **人物**: 描绘人物时,使用第三人称(如 'a woman', 'the man')。 ** **质量词**: 在生成的提示词末尾,务必添加以下质量增强词:`, best quality, high resolution, 4k, high quality`。 ## 只生成提示词,不需要描述过程及其他,并且一定要在质量词 | — |
| user_prompt | STRING | — | |
| user_requirement | STRING | — | |
| temperature | FLOAT | 0.700–1 | — |
| seed | INT | 00–18446744073709550000 | — |
| imageopt | IMAGE | — | |
| ref_imageopt | STRING | — | |
| top_popt | FLOAT | 0.800–1 | — |
| max_tokensopt | INT | 4001–4096 | — |
| image_urlopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| expanded_prompt | STRING | — |