LLM Prompt Writer
A local model that knows Anima wants tags and LTX hates full stops
- images
- prompt
Prompting tracks the text encoder now, not the model's release date. Illustrious wants comma-separated Danbooru tags in attention order. Krea2 wants 80–250 words of photographer's prose. LTX 2.3 reads a full stop as a possible cut, so a paragraph of short sentences becomes a string of disconnected moments. Doing that translation by hand for four different models is a skill; having a small local LLM do it for you is a Tuesday.
LLM Prompt Writer (DaSiWa_LLMPromptWriter) is the simple front door to this pack's LLM nodes. You type an idea, pick the model the prompt is for, and you get a STRING back. No API key, no cloud, no subscription - and, unusually, no way for a workflow to make it download anything.
What happens when you hit queue
The node builds the same config the pack's advanced Model Selector would build with its defaults and then runs the Analyze node's code path. write_for is the real switch: it selects an editable guide from the pack's data/llm_skills/ folder, written per target. The Anima and Illustrious guides ask for tags; Krea2, Wan 2.2 and LTX 2.3 get prose guides with their own length bands and ordering rules. Two are worth knowing about because you'd otherwise learn them from a bad render: the LTX guide wants one flowing sentence rather than short ones, and the YuE2 presets produce musical text - Song Style, Lyrics with [Verse]/[Chorus] tags, or an instrumental description.
detail and creativity both default to 5, and 5 means "add no instruction at all, let the guide decide" - lower is shorter and more literal, higher covers more and invents more. Internally creativity also sets the sampling temperature, 0.30 at the bottom to 1.10 at the top, with 0.70 at 5.
start_with is the one field that never touches the model. Quality tags, LoRA trigger words, anything that must lead the prompt goes there exactly as typed, and it's prepended verbatim - on Anima and Illustrious a duplicate of that tag in the written part is stripped so you don't get it twice. The author's example is the honest one: masterpiece, best quality, score_7 belongs in start_with, because the writer doesn't invent quality tags of its own.
Output is a single prompt STRING - wire it into your CLIP Text Encode the same as you'd wire a text box.
Picking the model it writes with
model is one list of everything this machine can write with: GGUF files and Hugging Face folders in ComfyUI/models/llm, Ollama: <name> entries, and Server: <id> entries for an OpenAI-compatible server once its address is configured. Discovery runs in the background; press R in the node if a model you just installed isn't showing.
keep_loaded is the one you'll flip often. Off hands the memory back after every prompt so the image model can have it; on is faster for a run of prompts, and much more likely to have your card sweating when the sampler starts.
The optional images input takes one image or a batch and needs a vision model in the list. Up to 8 go through; a longer batch is sampled evenly from the first frame. Leave idea empty and connect pictures, and it writes the prompt from what it sees.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/darksidewalker/ComfyUI-DaSiWa-Nodes
cd ComfyUI-DaSiWa-Nodes && pip install -r requirements.txt
Or search DaSiWa-Nodes in ComfyUI Manager and restart. That's the shared install for one author's whole collection - darksidewalker, the DaSiWa handle behind the Wan 2.2 video workflows on Civitai. This is also the node where the pack's heavy dependencies earn their keep: transformers>=4.45.0, accelerate and llama-cpp-python>=0.3.26 come along whether you wanted them or not.
Then put a model on disk, because runtime downloads are deliberately unsupported. Into ComfyUI/models/llm/:
- a folder for the Transformers backend - it needs
config.json, tokenizer files, processor files for vision models, and the.safetensorsweights. A loose safetensors file won't load. - or a
.gguffile, which runs through llama.cpp.
The generic llama-cpp-python wheel from pip is often a CPU-only build - the difference between seconds and minutes per prompt. The pack's docs give the working CUDA 13.0 command:
/path/to/ComfyUI/venv/bin/python -m pip install --only-binary llama-cpp-python \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu130 'llama-cpp-python>=0.3.26'
Where people get burned
"Type an idea, or connect a picture to write the prompt from" is the node telling you it has nothing to work with - one of those two inputs has to be non-empty.
If the model list is empty or stale, that's a file-placement problem, not a bug: nothing in models/llm, or a folder missing its tokenizer. Ollama and server entries are cached lists; a stopped Ollama throws a clear "could not reach" message rather than silently producing junk.
Set max_tokens thoughtfully. It's 2048 here specifically because the advanced node's 256 chops an Anima or Krea2 prompt off mid-sentence - lower this one yourself and you can recreate that on purpose.
Both of this node's preset limits matter more than they look. Local enhancers drift: ask a model to add detail and it adds detail you never asked for, which is why creativity 1 exists. And a chat model's conversational habits are the classic failure mode for prompt nodes - preambles and role delimiters bleeding into your conditioning. A locked system guide is the defence, which is what the presets are.
Last: this is the simple node. If you need frame sampling, KV-cache options, quantization, dtype, device or a custom system prompt, use the pack's advanced LLM nodes - same code, all the dials.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | 1 options: None | |
| write_for | COMBO | Anima | 8 options: Anima, Illustrious, Krea2, Wan 2.2, LTX 2.3, YuE2 Song Style, +2 |
| start_with | STRING | — | |
| idea | STRING | — | |
| style | COMBO | None | 20 options: None, Painterly, Anime, Cel shaded, Flat color, Lineless, +14 |
| detail | INT | 51–10 | — |
| creativity | INT | 51–10 | — |
| max_tokens | INT | 2048128–8192 | — |
| seed | INT | 00–2147483647 | — |
| keep_loaded | BOOLEAN | false | — |
| imagesopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |