Prompt Composer
Type what you want, let your LoRA folder write the rest
- json_prompt
- text_prompt
The LoRA Prompt Composer is the node that asks you a question instead of the other way around. You type what you want to make in plain English - "cyberpunk woman in a neon-lit alley" - and it goes shopping in your models/loras folder, picks the LoRAs that actually fit the scene, and hands back a finished prompt with the <lora:name:weight> tags, trigger words, and weights already in place. If you're the person with 400 LoRAs who ends up prompting with the same three, this is aimed squarely at you.
Worth setting expectations first: the README sells this as "semantic LoRA discovery" and mentions sentence-transformers, but the shipped code actually builds its embeddings with scikit-learn's TF-IDF - names, descriptions, and trigger words turned into a term index, then scored against your scene description. The readme rotted; the code didn't. Either way it's a bag-of-words match, not a language model, so it's fast and offline, and it'll surprise you far more with what it doesn't catch than with what it does.
Here's how it works under the hood. On first run it recursively scans models/loras, but only keeps LoRAs that have a .metadata.json file sitting next to them - that's the LoRA Manager dependency you'll see in a second. It classifies each one as image or video LoRA from the base-model field in that metadata (anything mentioning Wan, i2v, or video counts as video), scores everything against your scene_description, sorts, and composes. Two niceties: content-specific LoRAs (character, pose) get their score multiplied by content_boost before ranking, and it will even auto-pair WAN 2.2 HIGH/LOW LoRA pairs so you don't end up with just the HIGH half of a character.
The inputs that matter:
scene_description- the only thing you really write. Be specific; "cinematic portrait of an old man" beats "portrait".max_image_loras(default 3) andmax_video_loras(default 2) - caps on how many tags per type land in the output.content_boost(default 1.2) - how hard content LoRAs get pushed up the ranking.style_preference-technical,artistic, ornatural; changes how the surrounding prompt reads, not which LoRAs win.image_lora_dir_path/wan_lora_dir_path- optional subfolders to restrict the search to, handy if you want only style LoRAs today.default_lora_weightandlow_lora_weight_offset- the second one drops WAN 2.2 LOW-pass LoRAs below the HIGH ones (e.g. 1.0 / 0.8), which mirrors how people actually run two-pass LoRAs.
It returns three strings: composed_prompt (the finished prompt - send it down the pack's usual path into the Visualizer and then into your text encoder), lora_analysis (which LoRAs were picked and their relevance scores), and metadata_summary (processing stats). All three are terminal outputs in the conditioning category.
Install is the standard story for this pack. Easiest via ComfyUI Manager - search "LoRA Visualizer" - or:
cd ComfyUI/custom_nodes
git clone https://github.com/oliverswitzer/ComfyUI-Lora-Visualizer.git
then restart ComfyUI. Dependencies are auto-installed; note there's no requirements.txt despite what the README's manual-install section says - the real deps live in pyproject.toml (scikit-learn, scipy) and ComfyUI handles them.
Where people get burned: the composer finds nothing if LoRA Manager hasn't downloaded metadata for your LoRAs - install ComfyUI-Lora-Manager first or the search pool is empty. And the README's advice to "reduce the threshold parameter" is stale: the current node has no threshold input. Your real levers are content_boost, the directory filters, and a more descriptive scene. If something still surprises you, run ComfyUI with COMFYUI_LORA_DEBUG=1 and it'll print a similarity score per LoRA so you can see exactly why it passed on your favorite.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| parts_data | STRING | [] | Internal: JSON list of prompt composer parts |
| promptopt | STRING | Optional base prompt. Composed parts are appended after it. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| json_prompt | STRING | — |
| text_prompt | STRING | — |