Nodes/Kraken Tools/πŸ™ Kraken Unbound Prompt
ComfyUI Node

πŸ™ Kraken Unbound Prompt

The prompt builder that can caption an image with a vision model, then style it

By krakenunboundΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 2
πŸ™ Kraken Unbound Prompt
  • input_image
  • positive_prompt
  • negative_prompt
  • persistent
β—„promptβ–Ί
β—„use_image_as_sourcefalseβ–Ί
β—„enhance_promptfalseβ–Ί
β—„model_nameQwen/Qwen2-VL-2B-Instructβ–Ί
β—„enhancer_styleβ–Ύβ–Ί
β—„temperature0.70β–Ί
β—„top_p0.90β–Ί
β—„max_new_tokens256β–Ί
β—„do_sampletrueβ–Ί
β—„enforce_char_limitfalseβ–Ί
β—„char_limit512β–Ί
β—„negative_promptβ–Ί
β—„persistentβ–Ί
β—„combine_persistenttrueβ–Ί
β—„styleβ–Ύβ–Ί
β—„lightingβ–Ύβ–Ί
β—„camera_lensβ–Ύβ–Ί
β—„f_stopβ–Ύβ–Ί
β—„bokehfalseβ–Ί
β—„dslrfalseβ–Ί
β—„separator, β–Ί
β—„prefixβ–Ί
β—„suffixβ–Ί
β—„show_section_labelsfalseβ–Ί
β—„apply_to_negativefalseβ–Ί
β—„positionappendβ–Ί
β—„keep_alive_minutes3β–Ί
β—„force_unloadtrueβ–Ί

The flagship of Kraken Tools is a prompt builder with a trick: it runs a real vision-language model locally to look at an image and write the caption for you, then layers camera, lighting, style, and lens settings on top, and hands you a ready-to-encode positive prompt plus a separate negative. That's the whole "unbound" pitch - one node between "here's a reference image" and "here's a fully-styled prompt," with no API calls and no key.

It's πŸ™ Kraken Unbound Prompt from Kraken Tools (krakenunbound/comfyui-kraken-tools). In the pack's graph it sits upstream of text encoding: Kraken Unbound Prompt β†’ CLIP Text Encode β†’ KSampler. This is the node that made the pack's README list transformers >= 4.45.0 as a requirement, because the vision part isn't free - it's a real 2B model loading on demand.

How it works

The core is a Qwen2-VL-2B-Instruct model (Qwen/Qwen2-VL-2B-Instruct, the only model_name choice). It serves two jobs: vision mode (set use_image_as_source and connect an input_image, and it captions the image into a text prompt) and enhancement (set enhance_prompt and it rewrites your existing prompt into something richer). Either way, the output flows through a stylistic rewriter that applies the dropdown settings. Generation params like temperature, top_p, max_new_tokens, and do_sample control the LLM pass; enforce_char_limit / char_limit clamp output length.

The style layer is where it feels like a whole prompt-writing app crammed into one node:

  • style - 14 options from photorealistic to manga to sci-fi, plus none.
  • lighting - soft, dramatic, cinematic, golden hour, neon, rim, backlighting, etc.
  • camera_lens and f_stop - 35mm through tilt-shift, f/1.8 through f/16, with bokeh and dslr toggles.
  • enhancer_style - the output dialect: Modern (SDXL/SD3/Flux), Classic Tags (SD 1.5/anime), Instructional (PixArt/Qwen), or WAN (the ComfyUI "Word As Keyword" style - listed as "Word As Neyword" in the dropdown, which is a typo the author never fixed, and harmless).

Then the assembly knobs: position (append or prepend the style block), separator, prefix/suffix, persistent (text always added, with combine_persistent), and apply_to_negative - which, per modern prompt knowledge, you should think about before turning on, since a negative prompt is mostly inert on CFG-1/LLM-encoded models anyway.

The VRAM story is genuinely considered: the model loads on demand, keep_alive_minutes (0–10) caches it for a short window, and force_unload (on by default) frees VRAM right after the run so an 8GB card isn't left holding a 2B model while it generates.

Outputs

  • positive_prompt (STRING) β†’ the final styled prompt, into CLIP Text Encode.
  • negative_prompt (STRING) β†’ your negative text (or a styled negative if you opted in).
  • persistent (STRING) β†’ the passthrough persistent text, for when you're compositing prompts downstream.

Install

Pack install as usual, plus this node's specific dependency:

cd ComfyUI/custom_nodes
git clone https://github.com/krakenunbound/comfyui-kraken-tools
cd comfyui-kraken-tools
pip install -r requirements.txt   # pulls transformers>=4.45

The Qwen model downloads from HuggingFace on first use (a couple of GB). It can be pointed at ComfyUI/models/llm/ if you've pre-downloaded it. The node's own console tip says: if the load fails, pip install --upgrade transformers. Restart ComfyUI after installing the pack.

Where people get burned

  • First run downloads a model. The node does not phone home per-prompt - it's fully local - but the initial model download is a real, large download. If the first run seems hung, it's downloading; watch the console.
  • Vision mode and enhance are separate toggles. use_image_as_source captions the image; enhance_prompt rewrites text. Turn on the wrong one (or both) and you get a surprising prompt. They're independent by design.
  • Big max_new_tokens + char limit off = rambling. With max_new_tokens at 1024 and no char limit, Qwen can happily write a paragraph. If you want tag-style output, tighten tokens and turn on enforce_char_limit.
  • force_unload default on means re-load per run. That's the right default for VRAM, but it costs a few seconds each queue if you're iterating a lot - bump keep_alive_minutes if you're doing a batch of variations.
  • The style block is English prose, mostly. Classic Tags mode keeps booru-style tags for anime models; the other modes output natural-language instructions, which is exactly what 2026-era LLM-encoded models want. Don't feed Modern output to an SD 1.5 model and expect tags.

If you've been copy-pasting prompts between an image captioneer and a style preset app, this node is both of those things living inside your graph. It's the pack's most ambitious node - and the only one that needs a model download to do its thing.

CategoryπŸ¦‘ Kraken / Prompt

Inputs (29)

NameTypeDefaultDescription
promptSTRINGβ€”
use_image_as_sourceoptBOOLEANfalseβ€”
input_imageoptIMAGEβ€”
enhance_promptoptBOOLEANfalseβ€”
model_nameoptCOMBOQwen/Qwen2-VL-2B-Instruct1 options: Qwen/Qwen2-VL-2B-Instruct
enhancer_styleoptCOMBO4 options: Modern (SDXL / SD3 / Flux), Classic Tags (SD 1.5 / Anime), Instructional (PixArt / Qwen), WAN (Word As Neyword)
temperatureoptFLOAT0.700–2β€”
top_poptFLOAT0.900.1–1β€”
max_new_tokensoptINT25616–1024β€”
do_sampleoptBOOLEANtrueβ€”
enforce_char_limitoptBOOLEANfalseβ€”
char_limitoptINT51232–2000β€”
negative_promptoptSTRINGβ€”
persistentoptSTRINGβ€”
combine_persistentoptBOOLEANtrueβ€”
styleoptCOMBO14 options: none, photorealistic, cinematic, anime, manga, fantasy, +8
lightingoptCOMBO10 options: none, soft lighting, dramatic lighting, cinematic lighting, studio lighting, natural lighting, +4
camera_lensoptCOMBO6 options: none, 35mm, 50mm, 85mm portrait, fisheye lens, tilt-shift lens
f_stopoptCOMBO6 options: none, f/1.8, f/2.8, f/4, f/8, f/16
bokehoptBOOLEANfalseβ€”
dslroptBOOLEANfalseβ€”
separatoroptSTRING, β€”
prefixoptSTRINGβ€”
suffixoptSTRINGβ€”
show_section_labelsoptBOOLEANfalseβ€”
apply_to_negativeoptBOOLEANfalseβ€”
positionoptCOMBOappend2 options: append, prepend
keep_alive_minutesoptINT30–10β€”
force_unloadoptBOOLEANtrueβ€”

Outputs (3)

NameTypeDescription
positive_promptSTRINGβ€”
negative_promptSTRINGβ€”
persistentSTRINGβ€”