Allma Generate
A prompt enhancer that knows what your workflow is doing
- connectivity
- model
- images
- audios
- output_prompt
- thinking
- assembled_system_prompt
- status
Prompt-enhancer nodes are everywhere now, and most of them are blind: you paste a rough idea, an LLM rewrites it, done. Allma Generate is the one that bothers to look at your graph first. Wire in a reference image and it finds the file that image came from, reads that file's embedded prompt metadata, and tells the model "here's the original prompt, model and LoRAs behind this picture" - so it can do "same group of people, now on a beach" instead of guessing. Wire in your LoRA loader and it sniffs every active LoRA's trigger words and sidecar notes and feeds those to the model too. That's the whole pitch: the LLM gets context, not just a prompt.
The inputs that matter
connectivity- the token from Allma Connectivity. One backend, shared across every Generate.user_prompt- your brief, the thing to enhance.system_prompt- the single source of truth for what the model is told. Picking apresetfills this for you, but the widget is the authority at run time.enabled- OFF skips the LLM entirely and passesuser_promptstraight through to the output. That means the graph still runs with the backend down - a genuinely thoughtful escape hatch.use_image_metadata- traces each connected image back to the file it came from (the stock Load Image included - no extra wiring) and appends that file's prompt metadata.read_lora_metadata- ON (default) injects each LoRA's full sidecar block: trigger words, notes, usage tips, the author's description. OFF still injects trigger words, because they're literal tokens the LoRA needs to activate and practically free.model(optional) - connect yourLoraLoaderoutput here and the pack's monkey-patch records each applied LoRA's path and strength.
The metadata the LLM receives comes from three sources, in order of authority: your own lora_hints/<lora-file-stem>.md files (stored inside the plugin, re-read every generation - the README's recommended pattern), rgthree's *.rgthree-info.json (most reliable trigger-word source), and LoRA Manager's *.metadata.json. Full precedent: human hints > extracted format hints > usage tips > notes > description.
The outputs
output_prompt- the answer. The design rule that matters: diagnostics never ride here. On any failure this carries the rawuser_promptinstead of an error message, so a downstream node expecting a prompt always gets one.thinking- the reasoning channel, empty when thinking is off. Wire it to Allma Live Text to watch it stream.assembled_system_prompt- the exact prompt the model read. Wire it to a text node when you want to audit what was actually sent.status- empty on a clean run; otherwise it says what went wrong (truncation, backend down, no model selected).
Install
cd ComfyUI/custom_nodes
git clone https://github.com/OliveiraNickolas/AllmaNodes
Restart. No pip install, but you do need a running Allma backend (default 127.0.0.1:9000) or any OpenAI-compatible endpoint - this is the LLM half of the pack.
Where the gotchas are
The token budget trap is the big one: thinking and the answer share max_tokens, so a tight budget with thinking ON can burn everything on reasoning and return an empty answer - the README measured it (96 tokens, all reasoning, empty output). Watch status for that. And the honest bigger picture from the LLM-in-ComfyUI knowledge base: an enhancer is a convenience that removes the blank-page problem, not a writer. It can drift into detail you never asked for, so keep its job narrow. This pack is also brand new with zero community track record - the mechanism (HTTP + graph-walking for metadata) is simple enough to trust, but there's no crowd of users to have found the sharp edges yet.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| connectivity | ALLMA_CONNECTIVITY | — | |
| use_image_metadata | BOOLEAN | true | When ON, each connected image is traced back through the graph to the file it was loaded from, and that file's embedded prompt metadata is added to the system prompt — so the model can reason over the original prompt/model/LoRAs behind the picture. |
| read_lora_metadata | BOOLEAN | true | ON: when MODEL is connected, inject each LoRA's full sidecar block (trigger_words + notes + usage_tips + author description) into the system prompt so the LLM can mine the author's prompt-format guidance. Costs more tokens + more reasoning effort. OFF: still inject trigger_words (they are literal tokens the LoRA needs to activate and are practically free), but skip the rest. |
| preset | COMBO | 1 options: (none) | |
| user_prompt | STRING | — | |
| system_prompt | STRING | — | |
| enabled | BOOLEAN | true | OFF: skip the LLM entirely and pass user_prompt straight through to 'output_prompt'. Nothing is sent to Allma, so the graph still runs with the backend down. ON: normal enhancement. |
| modelopt | MODEL | — | |
| imagesopt | COMFY_AUTOGROW_V3 | — | |
| audiosopt | COMFY_AUTOGROW_V3 | — | |
| durationopt | FLOAT | Clip length in SECONDS — wire the same FLOAT that drives the workflow's length. Stated in the system prompt so the model scripts the action to fit the real clip instead of guessing. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| output_prompt | STRING | — |
| thinking | STRING | — |
| assembled_system_prompt | STRING | — |
| status | STRING | — |