ComfyUI Node

FalLLaVAAPI

Make LLaVA describe your images, from a ComfyUI node

By BetaDoggo·Created 2 years ago·Updated 6 months ago· 38
FalLLaVAAPI
  • image
  • STRING
promptDescribe this image
max_tokens64
temp0.20
top_p1.00
model
api_key

FalLLaVAAPI is the image-to-text node in this pack: it runs LLaVA - a vision-language model - on fal.ai, points it at an image you feed in, and returns a STRING caption. If you've ever wanted an automatic way to caption a reference image for a prompt, or to build a little "describe this, then generate something like it" loop, this is the node. It's a different beast from the image generators in the same pack: it costs nothing per token on the scale of a generation, and its output is text you can wire anywhere a STRING is accepted.

How it works

You connect an image, it uploads it to fal, runs the LLaVA endpoint, and returns the model's text response. The model dropdown offers two sizes: LLavaV15_13B (the classic LLaVA 1.5 13B) and LLavaV16_34B (the newer, bigger 34B - notably stronger at following instructions). The 34B costs more and takes longer; the 13B is the default sensible choice for simple descriptions.

The default prompt is "Describe this image" - change it to steer what you get back. Ask for "a detailed prompt suitable for Stable Diffusion" and you'll get exactly that; ask for a list of colors and you'll get a list. LLaVA follows instructions reasonably well, and with the 34B model, quite well.

The inputs that matter

  • image - the IMAGE to analyze.
  • prompt - your instruction to the model. This is where the value lives.
  • model - 13B vs 34B; the size-vs-cost tradeoff.
  • max_tokens - default 64, 16–512. Keep it low for short tags, raise it for long detailed descriptions. A too-short cap truncates your caption mid-sentence.
  • temp - sampling temperature, default 0.2. Low is right for captioning; raise only if you want more varied phrasing.
  • top_p - default 1.0.
  • api_key - fal key file.

Single STRING output. Wire it into any prompt field, or a Show Text node to see it.

Install

Same pack, same drill:

cd ComfyUI/custom_nodes
git clone https://github.com/BetaDoggo/ComfyUI-Cloud-APIs

or Manager → search "ComfyUI-Cloud-APIs", restart, fal key in ComfyUI-Cloud-APIs/keys/, credit at fal.ai/dashboard/billing.

Troubleshooting

  • Caption gets cut off - max_tokens is 64 by default. If you're asking for detailed descriptions, raise it to 128-256.
  • Generic "an image of..." output - your instruction prompt is too vague. LLaVA describes what it sees; if you want useful prompt material, ask for it explicitly ("describe this image as a detailed text-to-image prompt including style, lighting, and composition").
  • Key errors - the fal key file is read as plaintext; make sure it's clean. Same rule as every node in this pack.
  • Cost - vision inference is cheaper than image generation by a wide margin, but the 34B model at high token counts still adds up over a big batch. Keep max_tokens honest.

The pack is archived, but this is a simple API call to a fal endpoint that isn't going anywhere soon - LLaVA-style captioning is one of the more stable services in this whole pack.

CategoryComfyCloudAPIs

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGDescribe this image
max_tokensINT6416–512
tempFLOAT0.200–1
top_pFLOAT1.000–1
modelCOMBO2 options: LLavaV15_13B, LLavaV16_34B
api_keyCOMBO1 options: nokey.txt

Outputs (1)

NameTypeDescription
STRINGSTRING