Nodes/SDXL Auto Prompter/APNext Universal Vision Cloner
ComfyUI Node

APNext Universal Vision Cloner

Image-to-prompt with any LLM provider you've got a key for

By dagthomas·Created 3 years ago·Updated 13 days ago· 283
APNext Universal Vision Cloner
  • images
  • formatted_output
  • raw_response
  • faded_image
  • model_used
modelauto-detect
fade_percentage15.0
analysis_modeDetailed Analysis
seed-1
randomize_each_runtrue
custom_prompt
output_formatFormatted Prompt
detail_levelDetailed
temperature-1.0

Feed it a picture, get back a prompt. APNext Universal Vision Cloner is an image-to-prompt node: it sends your image to a vision-capable LLM, which describes it - or reverse-engineers its style - into text you can drop back into a new generation. The "Universal" part is the selling point: instead of locking you to one provider, it auto-detects whichever API key you've set and routes to that model, so the same node works whether you're paying OpenAI, Google, Anthropic, xAI, or Groq.

This is the workhorse behind a very 2026 workflow. Having an LLM look at a reference and write the prompt for you has gone from a browser-tab hack to a standard node - corpus mentions of prompt-enhancer nodes have climbed roughly twentyfold over three years. If the model reads your prompt like an instruction anyway (Flux, Z-Image, Anima all do), then having an LLM write that instruction from an image is just translation between two things that speak the same language.

How it works

You wire in an image, the node builds a prompt for the vision model (shaped by your analysis_mode), sends the image plus that prompt to whichever provider model resolves to, and hands you back the text. Feed multiple images and fade_percentage blends them first, so you can clone a mix of references rather than a single one. There's no local model here - this node calls a cloud API, which is why it needs a key. (The same pack has local vision nodes - QwenVL, MiniCPM, Phi, Ollama - if you'd rather not pay or set keys.)

The inputs and outputs that matter

  • images (required, IMAGE) - the reference you're describing or cloning.
  • model (default auto-detect) - leave it on auto-detect and it uses whatever key you've configured, or pin a specific provider:model like claude:claude-sonnet-4.5 or gemini:gemini-2.5-flash.
  • analysis_mode - the big behavior switch: Detailed Analysis (describe everything), Style Cloning (capture the look, not the content), Scene Description, Creative Interpretation, or Custom (you supply the instruction).
  • output_format - Formatted Prompt (ready to paste), Text Only, or JSON Structure (clean field separation, which LLM-encoded models handle well).
  • detail_level - Brief through Very Detailed. More detail isn't always better; long descriptions can drift past the ~75-100-token attention cap on 2026 models.
  • custom_prompt (optional) - your instruction when analysis_mode is Custom.
  • fade_percentage, seed (-1 = random), randomize_each_run, temperature (-1 = the provider's default) - blending and variation controls.

Four outputs: formatted_output (STRING - the prompt to wire into a CLIP Text Encode), raw_response (STRING - the model's unedited reply), faded_image (IMAGE - the blended input, useful when you fed several), and model_used (STRING - which model actually ran, handy on auto-detect so you know who answered).

How to install it

ComfyUI Manager: search comfyui_dagthomas or "SDXL Auto Prompter", install, restart. Manually:

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

That requirements.txt matters for this node specifically - it installs the provider SDKs (openai, google-generativeai, anthropic) the cloner depends on. Then set your key as an environment variable (OPENAI_API_KEY, GEMINI_API_KEY, ANTHROPIC_API_KEY, XAI_API_KEY, or GROQ_API_KEY) and restart ComfyUI so it's picked up.

Common issues & troubleshooting

Ninety percent of the trouble is the API key. auto-detect finds nothing if no key is set in the environment, and a key set in a different shell than the one running ComfyUI won't be seen - set it, then fully restart. On a managed or serverless ComfyUI where you can't set your own environment variables, this node simply can't authenticate; reach for the pack's local vision nodes instead.

It also costs real money per run - cloud vision calls are metered. It's cheap per image (the author has quoted on the order of a tenth of a cent per image when scaling inputs down before sending), but a batch adds up, and errors like rate limits or an invalid model name surface as runtime failures, not node-load errors. Pin a model you know your key covers if auto-detect picks one you don't have access to.

Finally, when the output disappoints: match the mode to the goal. Style Cloning deliberately ignores subject matter, so if you wanted the content described, you're on the wrong mode - switch to Detailed Analysis. And keep the pack updated; it's large and fast-moving, and a stale copy is the usual cause of a load error.

Categorycomfyui_dagthomas

Inputs (10)

NameTypeDefaultDescription
imagesIMAGE
modelCOMBOauto-detect17 options: auto-detect, gemini:gemini-2.5-pro, gemini:gemini-flash-latest, gemini:gemini-2.5-flash, gemini:gemini-flash-lite-latest, gemini:gemini-2.5-flash-lite, +11
fade_percentageFLOAT15.00.1–50
analysis_modeCOMBODetailed Analysis5 options: Detailed Analysis, Style Cloning, Scene Description, Creative Interpretation, Custom
seedINT-1-1–18446744073709550000
randomize_each_runBOOLEANtrue
custom_promptoptSTRING
output_formatoptCOMBOFormatted Prompt3 options: Text Only, JSON Structure, Formatted Prompt
detail_leveloptCOMBODetailed4 options: Brief, Moderate, Detailed, Very Detailed
temperatureoptFLOAT-1.0-1–2

Outputs (4)

NameTypeDescription
formatted_outputSTRING
raw_responseSTRING
faded_imageIMAGE
model_usedSTRING