Nodes/comfyui-cyberdelia-z-engineer/Cyberdelia Prompt Engineer — Text
ComfyUI Node

Cyberdelia Prompt Engineer — Text

An LLM prompt enhancer for workflows that never touch CLIP

By cyberdeliaAI·Created 5 months ago·Updated 4 days ago· 16
Cyberdelia Prompt Engineer — Text
  • image
  • prompt
◄modetrue►
◄text►
◄system_promptYou are a helpful assistant.►
◄api_urlhttp://localhost:1234/v1►
◄modelauto►
◄seed0►
◄temperature0.70►
◄max_tokens600►
◄timeout120►
◄keep_terms►
◄preserve_constraintsfalse►
◄clean_outputtrue►
◄error_modestop►
◄retries1►
◄use_visionfalse►
◄vision_system_promptAnalyze the attached image and return only one detailed image-generation prompt in English.►
◄active_system_prompt—►

Most LLM prompt-enhancer nodes in ComfyUI sit between your text encoder and the sampler, which means they expect a CLIP model hanging around to encode the result. That's the wrong shape for a growing slice of 2026 workflows. Krea2 encodes text with its own model-specific hidden states. External encoders and metadata savers just want a string. Cyberdelia Prompt Engineer - Text is the CLIP-free variant from the cyberdeliaAI/comfyui-cyberdelia-z-engineer pack: rough idea in, cleaned, model-ready prompt string out, no encoder required, no API key, no model downloads.

It talks to the LLM running on your own machine - LM Studio or Ollama on http://localhost:1234/v1 by default - so it's offline, uncensored, and free per call. That's the local-prompt-enhancer deal the community has converged on: small and obedient beats large and clever for the job of rewriting a prompt.

How it works

The mode toggle is the whole engine. Off is passthrough: your text returns completely unchanged, no network call, no cleaning - the bypass is genuinely built in. On is engineered: the text goes to the LLM with your system_prompt, and the output gets scrubbed before it comes back. That cleaning is the part people underestimate. A chat model will cheerfully hand you role delimiters, "Here is your enhanced prompt:", and markdown fences, and every byte of that would land in your conditioning if it weren't stripped. clean_output (on by default) removes exactly that noise - reasoning blocks, ChatML, fences, labels.

There's also a real image-to-prompt path. Connect Load Image's IMAGE to the image input, flip on use_vision, and the first image gets resized to max 1536px, encoded locally, and sent to a vision-capable model using the separate vision_system_prompt. Leave text empty for a straight image-to-prompt conversion, or use it to steer: "Make it a night scene in Tokyo."

Two inputs that earn their keep: keep_terms pins LoRA triggers or names verbatim (comma-separated, it deterministically re-appends anything the LLM dropped), and preserve_constraints conservatively keeps quoted text, counts, colors, and lens strings like 24-70mm f/2.8 - off by default, turn it on when you need the details preserved.

The inputs and output

The core set is small: text, system_prompt, api_url, model (or auto), seed, temperature, max_tokens, timeout. The optional row adds keep_terms, preserve_constraints, clean_output, error_mode, retries, use_vision, vision_system_prompt, and image.

Output: a single prompt STRING. Feed it to Krea2's encoder, a preview node, or your image saver's metadata field - the README's suggested Krea2 chain is Load Image (optional) → Prompt Engineer - Text → Krea2 encoder → conditioning.

The bundled Cyberdelia Detailed 200–250 preset shows the Danbooru node's opposite personality: it's an uncensored, abliteration-optimized system prompt pushing for a vivid 200–250 word paragraph. Add your own .txt files in ComfyUI/user/z_engineer/presets/ and hit ↻ Refresh presets. Selecting one copies its text into system_prompt, so the workflow stays reproducible even if the file changes later.

Installing it

Same pack, same drill - it needs only requests plus a running OpenAI-compatible chat-completions endpoint.

cd ComfyUI/custom_nodes
git clone https://github.com/cyberdeliaAI/comfyui-cyberdelia-z-engineer.git
pip install -r comfyui-cyberdelia-z-engineer/requirements.txt

Restart ComfyUI, or search Cyberdelia in ComfyUI Manager.

Gotchas

Nothing happens in passthrough - if the output looks untouched, check mode first. The "200–250 words" preset is an instruction to the model, not a promise; the node won't pad short output. Vision mode requires an image and use_vision on, and auto only considers models LM Studio explicitly reports as vision-capable. And top_p/top_k/min_p are deliberately not sent - set those in LM Studio. One honest warning: if the server is down in engineered mode, the default error_mode: stop halts your workflow with a clear error on the node. fallback_input keeps things moving with your seed; empty returns nothing. Retries (default 1) only cover transient 429/5xx/timeout failures, so a wrong model ID won't spin forever.

CategoryCyberdelia/Prompt

Inputs (18)

NameTypeDefaultDescription
modeBOOLEANtrue—
textSTRING—
system_promptSTRINGYou are a helpful assistant.—
api_urlSTRINGhttp://localhost:1234/v1—
modelSTRINGauto—
seedINT00–18446744073709550000—
temperatureFLOAT0.700–2—
max_tokensINT60050–262144—
timeoutINT12010–600—
keep_termsoptSTRING—
preserve_constraintsoptBOOLEANfalse—
clean_outputoptBOOLEANtrue—
error_modeoptCOMBOstop3 options: stop, fallback_input, empty
retriesoptINT10–3—
use_visionoptBOOLEANfalse—
vision_system_promptoptSTRINGAnalyze the attached image and return only one detailed image-generation prompt in English.—
active_system_promptoptSTRING—
imageoptIMAGE—

Outputs (1)

NameTypeDescription
promptSTRING—