Extensions/comfyui-gguf-prompt-rewriter
ComfyUI Extension

comfyui-gguf-prompt-rewriter

Standalone ComfyUI nodes for prompt rewriting with local GGUF models via llama-cpp-python.

By hlibr·Created 4 months ago·Updated 2 months ago· 2
hlibr/ComfyUI-GGUF-Prompt-Rewriter
Nodes
On cloudLocal install
Stars2
Updated2 months ago
Readme

ComfyUI GGUF Prompt Rewriter

Standalone ComfyUI custom nodes for rewriting plain-English prompts with a local GGUF LLM through llama-cpp-python.

This package was designed for prompt rewriting and booru-style tag generation without relying on remote APIs or merging into other prompt/tagger extensions.

<img width="292" height="618" alt="Screenshot 2026-05-01 at 10 00 45 AM" src="https://github.com/user-attachments/assets/0393bfb2-e3ef-44dc-af4f-0b46d54d91b2" />

Nodes

GGUF Prompt Rewriter

Loads a local .gguf model and rewrites a user prompt with a configurable system prompt and decoding settings.

Outputs:

  • rewritten_prompt
  • raw_output

Notes:

  • Tested with uncensored Gemma 4 and Qwen3.6 models
  • The node loads the model for each run and closes it immediately afterward, so it does not keep a cached model in memory.

Model Locations

The node scans these directories for .gguf files:

  • ComfyUI/models/llm_gguf
  • ~/AI

Put your local GGUF files in either location and restart ComfyUI.

Installation

Clone into your ComfyUI custom nodes directory:

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/hlibr/ComfyUI-GGUF-Prompt-Rewriter.git

Install dependencies into the same venv ComfyUI uses:

/path/to/ComfyUI/.venv/bin/python -m pip install -r /path/to/ComfyUI/custom_nodes/ComfyUI-GGUF-Prompt-Rewriter/requirements.txt

Restart ComfyUI.

Dependencies

  • llama-cpp-python

ComfyUI itself provides the node runtime and folder_paths.

License

MIT