# ComfyUI ExLlamaV2 Nodes
A simple text generator for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) utilizing [ExLlamaV2](https://github.com/turboderp/exllamav2).
## Installation
Navigate to the root ComfyUI directory and clone the repository to `custom_nodes`:
```
git clone https://github.com/Zuellni/ComfyUI-ExLlama-Nodes custom_nodes/ComfyUI-ExLlamaV2-Nodes
```
Install the requirements depending on your system:
```
pip install -r custom_nodes/ComfyUI-ExLlamaV2-Nodes/requirements-VERSION.txt
```
| Loader |
Loads models from the llm directory. |
|
gpu_split |
Comma-separated VRAM in GB per GPU, eg 6.9, 8. |
|
cache_8bit |
Lower VRAM usage but also lower speed. |
|
max_seq_len |
Max context, higher number equals higher VRAM usage. 0 will default to config. |
| Generator |
Generates text based on the given prompt. Refer to text-generation-webui for parameters. |
|
unload |
Unloads the model after each generation. |
|
single_line |
Stops the generation on newline. |
|
max_tokens |
Max new tokens, 0 will use available context. |
| Preview |
Displays generated text in the UI. |
| Replace |
Replaces variable names enclosed in brackets, eg [a], with their values. |
## Workflow
The example workflow is embedded in the image below and can be opened in ComfyUI.
