Rebels Prompt Enhancer

Details

Download Files (1)

Model description

Rebels Prompt Enhancer Nodes for ComfyUI

WORK IN PROGRESS - More features coming soon!

VERSION 2 Now LIVE!

You can download and extract the ZIP and run the requirements but you MUST follow the dependency installation instructions in the step-by-step instructions below. There are BUILD DEPENDENCIES that are required so follow the installation steps even if you just download the ZIP file. you would just ignore the git clone command if you download the ZIP.

Four ultra-lightweight, local-only nodes for ComfyUI:

  • ๐Ÿš€ Rebels Prompt Enhancer โ€” curated Qwen3.5-4B text rewriter with a layered style system

  • ๐Ÿงช Rebels Prompt Enhancer (Custom GGUF - experimental) โ€” bring your own model, full control over every parameter

  • ๐Ÿ‘๏ธ Rebels Image to Prompt (EXPERIMENTAL, OUT OF ORDER) โ€” vision-capable node that turns a reference image into a prompt

  • ๐Ÿ”’ Rebels Prompt Locker โ€” workflow gate that displays the passed-through prompt on its node face

No API keys, no external calls, 100% private. Aggressive VRAM cleanup so your diffusion model gets the GPU back immediately after the prompt is generated.


Features

Universal across all nodes

  • Local-Only. Everything runs on your machine via llama-cpp-python. Nothing leaves the box.

  • Aggressive VRAM Cleanup. Models fully unload after each call.

  • Prompt Lock + Cache. Toggle LIVE to iterate freely, then LOCKED to freeze the result you like. Locked = no model load on subsequent runs.

  • Full Diagnostic Output. thought_process output shows the assembled system prompt, raw model output, what was stripped, and the final result.

Layered Style System (text enhancers)

Three independent dropdowns compose into the system prompt at runtime:

  • Purpose โ€” Image / Video / Edit. Controls subject framing.

  • Model Format โ€” How the prompt should be structured for the model you're feeding.

  • Aesthetic โ€” The visual style/vibe to apply.

This means hundreds of useful combinations from short dropdowns, all powered by the same 4B model.

Model Format Support

FormatUse ForFlux / ChromaNatural-language Flux and Chroma modelsZ-Image / Lumina-2LLM-text-encoder modelsHiDreamHiDream multi-encoder pipelineSDXLTag + weight syntax for SDXLSD 1.5Tag + weight syntax for SD 1.5Pony / IllustriousBooru tags with score and rating tagsLTX VideoMotion-focused prose for LTXHunyuan / Wan VideoCinematic motion proseUniversal Natural LanguageGeneric, works with most models

Aesthetic Library (22 styles)

Photorealistic ยท Cinematic Film ยท Anime/Manga ยท Studio Ghibli ยท Pixar/3D Animation ยท Comic Book ยท Concept Art ยท Oil Painting ยท Watercolor ยท Pencil Sketch ยท Cyberpunk ยท Steampunk ยท Fantasy ยท Sci-Fi ยท Horror/Dark ยท Vintage/Retro Film ยท Film Noir ยท Glamour/Editorial ยท Minimalist ยท Surreal/Dreamy ยท 3D Render/CGI ยท None (skip aesthetic injection)

Vision Support

The Image to Prompt node accepts any vision-capable GGUF + its paired mmproj projector. Supports multiple architectures via llama-cpp-python chat handlers:

  • LLaVA 1.5 / 1.6

  • Moondream

  • MiniCPM-V 2.6

  • NanoLLaVA

  • Qwen2.5-VL

Auto-detect picks the right handler from the filename, or override manually.


The Nodes

๐Ÿš€ Rebels Prompt Enhancer (curated)

Uses Qwen3.5-4B locally with /no_think baked in to suppress reasoning mode. Output arrives clean.

InputPurposeraw_promptYour input ideapurposeImage / Video / Editmodel_formatOutput structure for your target modelaestheticVisual style to applyprecisionEfficiency (UD-IQ2, ~2GB) or Quality (UD-Q8, ~6.5GB)seedRandomize freely; ignored when lockedlock_inLIVE or LOCKED

Outputs enhanced_prompt (clean string for the sampler) and thought_process (full diagnostic).

๐Ÿงช Rebels Prompt Enhancer (Custom GGUF)

(WARNING: this node is experimental and will sometimes provide bad results depending on gguf you use and format along with settings in the node. i suggest tweaking temperature and various settings until correct output is achieved.) Same layered style system as the curated enhancer, but scans the folder for any .gguf and lets you pick. Adds full sampling controls.

Additional inputs vs the curated node:

InputPurposemodel_filePick any GGUF found in the node folderextra_instructionsAppended to the layered system promptsystem_prompt_overrideIf non-empty, replaces the layered prompt entirely (full manual mode)append_no_thinkToggle the Qwen3 directive (only useful for Qwen3 family models)n_gpu_layers-1 = all on GPU, 0 = CPU only, N = partial offloadn_ctx, max_tokens, temperature, top_p, repeat_penaltySampling controls

๐Ÿ‘๏ธ Rebels Image to Prompt (EXPERIMENTAL, OUT OF ORDER)

Vision-capable node. Takes a reference image and outputs a prompt suitable for downstream generation.

InputPurposeimageComfyUI IMAGE inputmodel_fileVision-capable GGUF from the foldermmproj_filePaired mmproj projector filechat_handlerAuto-detect, or pick (LLaVA 1.5/1.6, Moondream, MiniCPM-V 2.6, NanoLLaVA, Qwen2.5-VL)vision_taskCaption / Caption + Format / SD Tags / Pose & Anatomy / Custommodel_formatApplied when vision_task = "Caption + Format"aestheticApplied when vision_task = "Caption + Format"custom_instructionUsed when vision_task = "Custom Instruction"Standard sampling + GPU controls + lockSame as Custom GGUF enhancer

Outputs image_prompt (clean) and thought_process (full diagnostic).

๐Ÿ”’ Rebels Prompt Locker

Workflow gate that also displays the prompt on its node face.

InputPurposetext_inputString to gate (typically enhanced_prompt or image_prompt)lock_in_promptPAUSED halts with ValueError; LOCKED IN passes through

The on-node text display requires the bundled web/js/rebels_locker_display.js extension to be present.


Installation

  1. Navigate to your ComfyUI custom_nodes folder:

    cd ComfyUI/custom_nodes
    
  2. Clone this repository:

    git clone https://github.com/RealRebelAI/RebelsPromptEnhancer.git
    
  3. Install dependencies.

    ComfyUI Portable (open cmd inside the cloned folder):

    ../../python_embeded/python.exe -m pip install -r requirements.txt
    

    ComfyUI Desktop:

    pip install -r requirements.txt
    

    If you hit build errors, upgrade your build chain first:

    ..\..\python_embeded\python.exe -m pip install --upgrade pip setuptools wheel scikit-build-core
    
  4. Download model file(s) from the Models section below and drop them directly in this node pack's folder.

  5. Restart ComfyUI.


Models

All models are GGUF format and live directly in the node pack folder. Download only what you'll use.

Curated text model (for ๐Ÿš€ Rebels Prompt Enhancer)

Repo: https://huggingface.co/unsloth/Qwen3.5-4B-GGUF

PrecisionFileSizeEfficiency (UD-IQ2)Qwen3.5-4B-UD-IQ2_XXS.gguf (or any UD-IQ2_*)1.5โ€“1.8 GBQuality (UD-Q8)Qwen3.5-4B-UD-Q8_K_XL.gguf5.95 GB

The node searches by filename substring (qwen3.5-4b + ud-iq2 or ud-q8), so renames work as long as the key tokens are intact.

Custom text models (for ๐Ÿงช Custom GGUF Enhancer)

Drop any GGUF text model in the folder and it'll show up in the dropdown. Examples:

  • Standard models: Any architecture llama.cpp supports โ€” Llama, Mistral, Phi, Gemma, Qwen, etc.

  • Uncensored fine-tunes (for NSFW prompt rewriting where standard models refuse or sanitize):

  • Larger models for users with more VRAM: use n_gpu_layers to control GPU offload at any model size

Vision models (for ๐Ÿ‘๏ธ Image to Prompt) (OUT OF ORDER)

Vision setups need two files: the main GGUF and a paired mmproj-*.gguf (vision projector). Both go in the node folder.

Recommended starting picks:

  • Qwen3.5-4B-Uncensored (HauhauCS link above) โ€” includes mmproj, works as both text AND vision model. Most efficient option if you're already using it for text.

  • Moondream2 โ€” ~1.6B, tiny and fast, solid general captioning

  • Qwen2.5-VL-3B โ€” modern vision model, fits 8GB VRAM cleanly

  • MiniCPM-V 2.6 โ€” 8B, SOTA for small VLMs, best descriptive quality


Hardware Notes

The enhancers aggressively unload the model after each run, so VRAM only needs to fit the LLM during the rewrite โ€” not alongside your diffusion model.

Approximate VRAM usage (model + 4k context)

ModelVRAMQwen3.5-4B UD-IQ2~2 GBQwen3.5-4B UD-Q8~6.5 GBQwen3.5-4B-Uncensored Q4_K_M~3 GBMoondream2~1.5 GBQwen2.5-VL-3B Q4~2.5 GBMiniCPM-V 2.6 Q4~5โ€“6 GB

For bigger models

The Custom Enhancer's n_gpu_layers setting controls GPU offload:

  • -1 (default) โ€” all layers on GPU (requires the model fits VRAM)

  • 0 โ€” pure CPU (slow but works for any model size, no VRAM needed)

  • N โ€” partial offload, N layers on GPU and the rest on system RAM

This means users with bigger cards can drop in 30B+ models and run them natively, and anyone can experiment with partial offload for models that exceed their VRAM.


Usage

Find all four nodes under "Rebel AI" in the node menu.

Basic text wiring

[Your Prompt Text] โ†’ raw_prompt โ†’ ๐Ÿš€ Enhancer โ†’ enhanced_prompt โ†’ ๐Ÿ”’ Locker โ†’ KSampler
                                              โ†’ thought_process โ†’ Preview-As-Text (optional)

Image-to-prompt wiring

[Load Image] โ†’ image โ†’ ๐Ÿ‘๏ธ Image to Prompt โ†’ image_prompt โ†’ ๐Ÿ”’ Locker โ†’ KSampler
                                            โ†’ thought_process โ†’ Preview-As-Text (optional)

Chained (image โ†’ faithful caption โ†’ styled prompt)

[Load Image] โ†’ ๐Ÿ‘๏ธ Image to Prompt (Caption) โ†’ ๐Ÿš€ Enhancer (apply Format + Aesthetic) โ†’ ๐Ÿ”’ Locker โ†’ KSampler

This chain captures the reference faithfully with the vision model, then runs that description through Qwen3.5-4B for the final styling โ€” which often beats letting the vision model do both jobs at once, because text models are better wordsmiths than vision models.

The Lock workflow

  1. Start the enhancer in LIVE with seed on randomize.

  2. Queue runs and iterate โ€” each run produces a different prompt because the seed changes.

  3. When you find a prompt you love, toggle the enhancer to LOCKED. From then on it skips model loading and returns the cached prompt every run. Seed changes are ignored.

  4. Independently, the Locker gates downstream execution โ€” flip it to LOCKED IN to let the prompt flow to the sampler.

The two locks are intentionally separate:

  • Enhancer lock freezes the prompt (cache).

  • Locker halts the workflow (gate).

The cache lives in memory for the ComfyUI session and clears on restart. Changing any non-seed input while locked invalidates the cache and triggers a fresh generation under the new key.


Folder Structure

RebelsPromptEnhancer/
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ *.gguf                          โ† drop text model files here
โ”œโ”€โ”€ mmproj-*.gguf                   โ† vision projector files (paired with vision models)
โ””โ”€โ”€ web/
    โ””โ”€โ”€ js/
        โ””โ”€โ”€ rebels_locker_display.js

The web/js/ extension is what makes the Locker display its text on the node face. Without it, the Locker still functions but won't render the text visually.


Built by Rebel AI.

Images made by this model