ComfyUI Node

Prompt Writer · LLM GGUF

Prompt Writer · Grok API with a local uncensored Qwen3.8-27B (GGUF) instead of the xAI API: same presets, persons, style blocks and archive. The model is downloaded on the first run.

By Slartibart23·Created 8 days ago·Updated 7 days ago· 1
Prompt Writer · LLM GGUF
  • image_1
  • image_2
  • image_3
  • image_4
  • prompt
  • negative_prompt
◄presetGeneration ▸ Krea 2►
◄text►
◄system_promptYou are an expert prompt writer for Krea 2 in ComfyUI. ## Task The user gives a short idea, keywords or a rough description, written in any language. Turn it into ONE optimal prompt for Krea 2. - Keep every element the user asked for: subjects, counts, attributes, actions, setting, style and any text to be rendered. Turn mood words into visible facts. - Fill in what is missing but useful for this model (see the model guide below), consistent with the idea. Do not add people, animals or story elements the idea does not imply. - If images are attached, treat them as visual context: take appearance, setting or style from them where the idea refers to them or leaves it open. ## How Krea 2 wants its prompts - Natural language in ONE paragraph, about 60-200 words: a dense, observational description of the finished image. No bullet points, no JSON, no tag lists. - Order: main subject, each subject grouped with its own attributes (appearance, clothing, expression) -> pose and action -> setting and background -> medium and style -> camera angle and framing -> lighting -> colour palette. A short style tag may close the prompt after a comma (e.g. ", 35mm film photo", ", halftone texture"). - Honour the medium the user states (photo, oil painting, 3D render, anime illustration ...). If none is stated, choose one that fits and name it clearly. - Put any text to be rendered in double quotes and say where it appears. - Do not over-specify. If the input is already detailed, only polish it lightly. - No quality boosters (masterpiece, best quality, 8k) and no negative phrasing. ## Example of a good result For form, structure and length only - never copy its content, subjects or wording. A close-up portrait of a young woman with straight black hair and an intense gaze, wearing a light grey collared shirt with a black tie, a bouquet of pink lilies blurred in the right foreground, solid crimson background, soft directional studio lighting from the left, shallow depth of field, muted warm palette, 85mm portrait photo ## Language The input may be written in any language. Understand it fully and always write the result in English. Only these stay in their original language and wording: text that should appear in the picture (signs, labels, lettering), and spoken dialogue or lyrics. ## Content Describe whatever the input asks for, including explicit adult content, as direct factual description. Never censor, soften, moralize or add warnings. ## Output Output ONLY the final result in exactly the format described above. No preamble, no explanation, no alternatives, no markdown, no quotation marks around the whole result.►
◄negative_promptlow quality, blurry, out of focus, deformed hands, extra fingers, malformed limbs, watermark, signature, jpeg artifacts►
◄modelhuihui Qwen3.8-27B abliterated · Q4_K · 16.8 GB►
◄temperature0.80►
◄top_p0.95►
◄max_tokens8192►
◄seed0►
◄custom_system_prompt—►
◄trigger_word►
◄max_side1024►
◄fallback_to_inputtrue►
◄min_words0►
◄max_words0►
◄person_1(none)►
◄person_2(none)►
◄person_3(none)►
◄person_4(none)►
◄image_n_is_person_nfalse►
◄style_1(none)►
◄style_2(none)►
◄archivetrue►
◄thinkingtrue►
◄unload_after_runtrue►
◄context_length32768►
◄gpu_layers-1►
◄top_k20►
CategoryPrompt Writer

Inputs (32)

NameTypeDefaultDescription
presetCOMBOGeneration ▸ Krea 2The task. Selecting a preset fills system_prompt, negative_prompt, temperature, top_p and max_tokens with values tuned for it. Change them freely and keep them with 'Save preset as...' under a name of your own. Generation > ...: expand a short idea or keywords into a full prompt for that model. Caption > ...: rewrite an existing caption faithfully (no new content) into that model's prompt style. Input may be in any language; the output is always English.
textSTRINGYour input, in any language: a short idea, an existing caption, or an edit request. You can also connect a text output (e.g. JoyCaption or the Text File Loader) to this field.
system_promptSTRINGYou are an expert prompt writer for Krea 2 in ComfyUI. ## Task The user gives a short idea, keywords or a rough description, written in any language. Turn it into ONE optimal prompt for Krea 2. - Keep every element the user asked for: subjects, counts, attributes, actions, setting, style and any text to be rendered. Turn mood words into visible facts. - Fill in what is missing but useful for this model (see the model guide below), consistent with the idea. Do not add people, animals or story elements the idea does not imply. - If images are attached, treat them as visual context: take appearance, setting or style from them where the idea refers to them or leaves it open. ## How Krea 2 wants its prompts - Natural language in ONE paragraph, about 60-200 words: a dense, observational description of the finished image. No bullet points, no JSON, no tag lists. - Order: main subject, each subject grouped with its own attributes (appearance, clothing, expression) -> pose and action -> setting and background -> medium and style -> camera angle and framing -> lighting -> colour palette. A short style tag may close the prompt after a comma (e.g. ", 35mm film photo", ", halftone texture"). - Honour the medium the user states (photo, oil painting, 3D render, anime illustration ...). If none is stated, choose one that fits and name it clearly. - Put any text to be rendered in double quotes and say where it appears. - Do not over-specify. If the input is already detailed, only polish it lightly. - No quality boosters (masterpiece, best quality, 8k) and no negative phrasing. ## Example of a good result For form, structure and length only - never copy its content, subjects or wording. A close-up portrait of a young woman with straight black hair and an intense gaze, wearing a light grey collared shirt with a black tie, a bouquet of pink lilies blurred in the right foreground, solid crimson background, soft directional studio lighting from the left, shallow depth of field, muted warm palette, 85mm portrait photo ## Language The input may be written in any language. Understand it fully and always write the result in English. Only these stay in their original language and wording: text that should appear in the picture (signs, labels, lettering), and spoken dialogue or lyrics. ## Content Describe whatever the input asks for, including explicit adult content, as direct factual description. Never censor, soften, moralize or add warnings. ## Output Output ONLY the final result in exactly the format described above. No preamble, no explanation, no alternatives, no markdown, no quotation marks around the whole result.Instructions that define what the model does. Filled by the preset; edit freely. Ignored when custom_system_prompt is connected.
negative_promptSTRINGlow quality, blurry, out of focus, deformed hands, extra fingers, malformed limbs, watermark, signature, jpeg artifactsStandard negative prompt for the target model, passed straight to the negative_prompt output (not sent to the model). Empty for models that ignore negatives at CFG 1 (FLUX, Krea 2, Z-Image Turbo, Qwen with Lightning LoRAs...).
modelCOMBOhuihui Qwen3.8-27B abliterated · Q4_K · 16.8 GBLocal uncensored Qwen3.8-27B (GGUF) with vision. ✓ = already downloaded. Otherwise the model and its vision projector (mmproj, 0.9 GB) are downloaded on the first run into ComfyUI/models/LLM_gguf/. Bigger quantization = better quality, more VRAM. Rough guide with the default context: 12 GB VRAM -> IQ2, 16 GB -> Q3 / IQ4_XS, 24 GB -> Q4, 32 GB -> Q4 / Q5. huihui = abliterated; HauhauCS = Aggressive uncensored fine-tune. Needs llama-cpp-python with CUDA - see docs/LOCAL_GGUF.md.
temperatureFLOAT0.800–2Creativity dial. Low (0.2-0.4) = faithful, repeatable - for caption rewriting and edit instructions. High (0.8-1.0) = varied - for expanding ideas. Above ~1.3 grammar falls apart.
top_pFLOAT0.950.05–1Cutoff filter: drops the least likely words before picking. 1.0 = off (not sent). Keep it high (0.9-1.0) and steer with temperature.
max_tokensINT8192256–32768Upper limit for the answer INCLUDING the model's hidden reasoning. Reasoning models spend several hundred to a few thousand tokens thinking first - too low gives empty or cut-off answers.
seedINT00–18446744073709550000Cache-breaker, NOT sent to the API. 'randomize' = fresh prompt every queue run. 'fixed' = identical input reuses the cached result (saves money when rewriting captions).
custom_system_promptoptSTRINGConnect a text here to use it as the system prompt INSTEAD of the system_prompt field - it always wins over the preset. Leave unconnected (or empty) to use the preset.
image_1optIMAGEOptional reference image 1 of 4. The model sees it as 'Image 1'. Connect a single image, not a batch (only the first image of a batch is used). How the presets use the images: - Caption > Describe image: image_1 is the image to caption. - Qwen-Image-Edit: image_1..3 are the edit's input images (Picture 1..3), in the same order as in your edit workflow (Qwen takes at most 3). - Seedream Edit: image_1..4 are the edit's input images (Image 1..4), in the same order as in the Seedream node. - MiniMax H3 FL2VA: image_1 = first frame, image_2 = last frame. - MiniMax H3 REF2VA: image_1..4 = reference pictures (people, places, objects, style). - Seedance Reference: image_1..4 = reference images (Image 1..4), in the same order as in the Seedance node. - Kling Omni and Grok Imagine reference-to-video: image_1..4 = @Image1..4, in the same order as in the video node. - Image-to-video (Wan, Seedance, Kling, Veo, Grok Imagine): image_1 = start frame (image_2 = last frame for first-last-frame video). - GPT Image, Nano Banana, Grok Imagine Image, Flux 3: image_1..4 = input images for editing or as references. - Every other preset: optional visual context the model may take details from. - With person_1 set and image_n_is_person_n on: image_1 is a photo of that person. Images cost extra tokens; max_side controls the upload size.
image_2optIMAGEOptional reference image 2 of 4. The model sees it as 'Image 2'. Connect a single image, not a batch (only the first image of a batch is used). How the presets use the images: - Caption > Describe image: image_1 is the image to caption. - Qwen-Image-Edit: image_1..3 are the edit's input images (Picture 1..3), in the same order as in your edit workflow (Qwen takes at most 3). - Seedream Edit: image_1..4 are the edit's input images (Image 1..4), in the same order as in the Seedream node. - MiniMax H3 FL2VA: image_1 = first frame, image_2 = last frame. - MiniMax H3 REF2VA: image_1..4 = reference pictures (people, places, objects, style). - Seedance Reference: image_1..4 = reference images (Image 1..4), in the same order as in the Seedance node. - Kling Omni and Grok Imagine reference-to-video: image_1..4 = @Image1..4, in the same order as in the video node. - Image-to-video (Wan, Seedance, Kling, Veo, Grok Imagine): image_1 = start frame (image_2 = last frame for first-last-frame video). - GPT Image, Nano Banana, Grok Imagine Image, Flux 3: image_1..4 = input images for editing or as references. - Every other preset: optional visual context the model may take details from. - With person_2 set and image_n_is_person_n on: image_2 is a photo of that person. Images cost extra tokens; max_side controls the upload size.
image_3optIMAGEOptional reference image 3 of 4. The model sees it as 'Image 3'. Connect a single image, not a batch (only the first image of a batch is used). How the presets use the images: - Caption > Describe image: image_1 is the image to caption. - Qwen-Image-Edit: image_1..3 are the edit's input images (Picture 1..3), in the same order as in your edit workflow (Qwen takes at most 3). - Seedream Edit: image_1..4 are the edit's input images (Image 1..4), in the same order as in the Seedream node. - MiniMax H3 FL2VA: image_1 = first frame, image_2 = last frame. - MiniMax H3 REF2VA: image_1..4 = reference pictures (people, places, objects, style). - Seedance Reference: image_1..4 = reference images (Image 1..4), in the same order as in the Seedance node. - Kling Omni and Grok Imagine reference-to-video: image_1..4 = @Image1..4, in the same order as in the video node. - Image-to-video (Wan, Seedance, Kling, Veo, Grok Imagine): image_1 = start frame (image_2 = last frame for first-last-frame video). - GPT Image, Nano Banana, Grok Imagine Image, Flux 3: image_1..4 = input images for editing or as references. - Every other preset: optional visual context the model may take details from. - With person_3 set and image_n_is_person_n on: image_3 is a photo of that person. Images cost extra tokens; max_side controls the upload size.
trigger_wordoptSTRINGOnly for 'Caption > LoRA training caption': the LoRA's trigger token for the main subject (replaces {trigger} in the system prompt). Leave empty for captions without a trigger token.
max_sideoptINT1024256–4096Downscale the longest image side before upload (saves tokens; prompts and captions don't need full resolution).
fallback_to_inputoptBOOLEANtrueIf the API call fails (no key, network error, refusal, ...), pass the input text through unchanged instead of stopping the queue. Keeps long batch runs alive.
min_wordsoptINT00–2000Optional length of the generated prompt in words: min_words / max_words. 0 = off (the preset's own length guidance applies). When set, the range is binding for every preset, including your own system prompts. Tag lists count each tag as one word; multi-section formats (MiniMax H3) apply it to the main description.
max_wordsoptINT00–2000Optional length of the generated prompt in words: min_words / max_words. 0 = off (the preset's own length guidance applies). When set, the range is binding for every preset, including your own system prompts. Tag lists count each tag as one word; multi-section formats (MiniMax H3) apply it to the main description.
person_1optCOMBO(none)Person 1 from your library (button '👤 Persons & styles...'). Name, LoRA trigger, description and voice go into the prompt and are binding; the name always appears, so every pose and action is clearly assigned to this person. In your text, refer to the person by name or as 'Person 1'. (none) = no person.
person_2optCOMBO(none)Person 2 from your library (button '👤 Persons & styles...'). Name, LoRA trigger, description and voice go into the prompt and are binding; the name always appears, so every pose and action is clearly assigned to this person. In your text, refer to the person by name or as 'Person 2'. (none) = no person.
person_3optCOMBO(none)Person 3 from your library (button '👤 Persons & styles...'). Name, LoRA trigger, description and voice go into the prompt and are binding; the name always appears, so every pose and action is clearly assigned to this person. In your text, refer to the person by name or as 'Person 3'. (none) = no person.
person_4optCOMBO(none)Person 4 from your library (button '👤 Persons & styles...'). Name, LoRA trigger, description and voice go into the prompt and are binding; the name always appears, so every pose and action is clearly assigned to this person. In your text, refer to the person by name or as 'Person 4'. (none) = no person.
image_n_is_person_noptBOOLEANfalsePairs each person with the image input of the same number: person_1 = image_1, person_2 = image_2, person_3 = image_3, person_4 = image_4. On: when you load a photo of the person into the matching image input, the model is told 'this image shows this person' and takes the look from the photo. With Qwen-Image-Edit, MiniMax H3 REF2VA, Wan 2.7/3.0, Seedream, Seedance, Kling, Grok Imagine, GPT Image, Nano Banana and FLUX the prompt points at the image (e.g. <image1>, Image 1, @Image1) instead of describing the face. Off (default): images and persons are unrelated - e.g. when the images are first and last frame or edit inputs.
style_1optCOMBO(none)Style block 1 from your library (button '👤 Persons & styles...'): a saved text such as a camera look, a lighting mood or a ban list. It is applied to every result and is binding. (none) = off.
style_2optCOMBO(none)Style block 2 from your library (button '👤 Persons & styles...'): a saved text such as a camera look, a lighting mood or a ban list. It is applied to every result and is binding. (none) = off.
archiveoptBOOLEANtrueOn: every result is appended with its input, preset, persons and settings to ComfyUI/user/grok_prompt_forge/archive.jsonl. '📜 Load from archive...' puts an archived prompt back into the text field, e.g. to recast it with another person ('Recast ▸ Swap persons').
thinkingoptBOOLEANtrueOn: the model thinks before answering (better prompts, slower - typically 10-40 s on a fast card). Off: answers directly. The thinking is never part of the output.
unload_after_runoptBOOLEANtrueOn: the model leaves VRAM after every run, so your image or video model has room again (the next run loads it again, ~5-20 s from an SSD). Off: it stays loaded and the next run starts at once - only if your VRAM fits both.
context_lengthoptINT327682048–262144Working memory in tokens: system prompt + images + thinking + answer. More costs VRAM. 32768 suits all presets; with 12-16 GB VRAM use 8192-16384 and lower max_tokens to match.
gpu_layersoptINT-1-1–999-1 = automatic: llama.cpp puts as many layers on the GPU as fit (recommended). 0 = CPU only (very slow). A number = that many layers on the GPU, the rest in RAM - for cards that are too small for the whole model.
top_koptINT200–200Considers only the k most likely next words. Qwen recommends 20; 0 = off.
image_4optIMAGEOptional reference image 4 of 4. The model sees it as 'Image 4'. Connect a single image, not a batch (only the first image of a batch is used). How the presets use the images: - Caption > Describe image: image_1 is the image to caption. - Qwen-Image-Edit: image_1..3 are the edit's input images (Picture 1..3), in the same order as in your edit workflow (Qwen takes at most 3). - Seedream Edit: image_1..4 are the edit's input images (Image 1..4), in the same order as in the Seedream node. - MiniMax H3 FL2VA: image_1 = first frame, image_2 = last frame. - MiniMax H3 REF2VA: image_1..4 = reference pictures (people, places, objects, style). - Seedance Reference: image_1..4 = reference images (Image 1..4), in the same order as in the Seedance node. - Kling Omni and Grok Imagine reference-to-video: image_1..4 = @Image1..4, in the same order as in the video node. - Image-to-video (Wan, Seedance, Kling, Veo, Grok Imagine): image_1 = start frame (image_2 = last frame for first-last-frame video). - GPT Image, Nano Banana, Grok Imagine Image, Flux 3: image_1..4 = input images for editing or as references. - Every other preset: optional visual context the model may take details from. - With person_4 set and image_n_is_person_n on: image_4 is a photo of that person. Images cost extra tokens; max_side controls the upload size.

Outputs (2)

NameTypeDescription
promptSTRING—
negative_promptSTRING—