Files
Mordant-7B-Think/mordant-prompt-enhancer
ModelHub XC 07363583a3 初始化项目,由ModelHub XC社区提供模型
Model: Kezmark/Mordant-7B-Think
Source: Original Platform
2026-07-06 20:54:02 +08:00
..

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Just place the Mordant-Prompt-Enhancer file in your ComfyUI custom_nodes folder.
You can see in the example workflow how to connect everything. And the default settings should be good, and you can experiment after.
The node looks for the models in the /models/text_encoders forlders, so place the mordant gguf there.

What does the mode do? 

Enhancer is your daily prompt enhancer mode, general is more of a llm.

enable_enhancement toggle, basically turns the node on and off, for when you want to just use your own un-altered prompt.

Everything else is fairly obvious, if not, you should just leave it as is. Keep_loaded is if you have enough vram to keep the model loaded after generation, otherwise, by default the node unloads it.


**Installation**  
Place the node file in ComfyUI's `custom_nodes/` folder. The only additional dependency is `llama-cpp-python`.

**CPUonly** (no GPU offloading):
```bat
# Windows portable
python_embeded\python.exe -m pip install llama-cpp-python
```
```bash
# Linux / venv / Mac
pip install llama-cpp-python
```

**GPU / CUDA — recommended** (prebuilt wheels, no compiler required):
```bat
# Windows portable — replace cu121 with your CUDA version
python_embeded\python.exe -m pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121
```
```bash
# Linux / venv — replace cu121 with your CUDA version
pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121
```
> Supported versions: `cu121` · `cu122` · `cu124` · `cu125` — run `nvidia-smi` to check yours (topright of output).

<details>
<summary>Build from source (advanced — only if wheels fail)</summary>

Requires CUDA Toolkit, CMake, and C++ build tools (Visual Studio on Windows).

```bat
# Windows
set CMAKE_ARGS=-DGGML_CUDA=on
python_embeded\python.exe -m pip install llama-cpp-python --force-reinstall --no-cache-dir
```
```bash
# Linux
CMAKE_ARGS="-DGGML_CUDA=on" pip install llama-cpp-python --force-reinstall --no-cache-dir
```
</details>

After restarting ComfyUI, the node appears under `text/llm` as **Mordant Prompt Enhancer**. Just pick your model and start composing.