Extensions/ComfyUI-LLM-text-processor-MOD
ComfyUI Extension

ComfyUI-LLM-text-processor-MOD

Modified ComfyUI custom node for local GGUF LLM inference and multimodal image processing via llama.cpp. Features 10 image inputs. Based on KingManiya/ComfyUI-LLM-text-processor v1.3.0. Not actively maintained.

By Eklipsis·Created about a month ago·Updated about a month ago· 0
Eklipsis/ComfyUI-LLM-text-processor-MOD
Nodes1
On cloudLocal install
CategoryLLM Text Processor
Stars0
Updatedabout a month ago
Readme

ComfyUI LLM Text Processor MOD

A modified version of ComfyUI-LLM-text-processor v1.3.0 by KingManiya.

⚠️ Important: This MOD version is a one-time fork and will not be updated. For the latest features, bug fixes, and new model support, please use the original repository at https://github.com/KingManiya/ComfyUI-LLM-text-processor.

This extension adds a local LLM node for prompt writing, prompt rewriting, translation, captioning, extraction, and other text processing tasks inside ComfyUI. It discovers local GGUF models from ComfyUI/models/LLM, and it can accept up to 10 separate image inputs (each supporting ComfyUI batches) for multimodal models that use an external mmproj.

What's Different in This MOD

  • 10 image inputs (image_1 through image_10) instead of a single image input. Each input accepts a single image or a ComfyUI image batch.
  • Node renamed to LLM-text-processor_MOD.

Token & Context Recommendations for Multiple Images

When using several image inputs, especially with reasoning-enabled models, increase your generation limits:

| Setting | Recommended Minimum | | --- | --- | | max_tokens | 4096 or 8192 and above | | ctx_size | 16384 or above |

This is particularly important when reasoning is set to on or auto, because the model can spend a significant portion of the token budget on reasoning before producing the final answer.

For example, when using the Qwen3.5-9B-Uncensored-HauhauCS-Aggressive model with multiple images and reasoning enabled, a max_tokens of 2048 is often insufficient. Start with 4096 or 8192 and a ctx_size of 16384 or higher.

Features

  • Text generation and text transformation with local GGUF models
  • Up to 10 optional image inputs for multimodal llama.cpp models that use mmproj
  • Separate RESPONSE and REASONING outputs
  • System prompt presets from text files
  • Recursive model discovery from ComfyUI/models/LLM
  • Automatic llama.cpp setup on supported Windows systems
  • Download progress logs during automatic llama.cpp setup
  • Advanced llama.cpp options for users who need them
  • Optional enable_processing toggle for switching between node processing and direct passthrough

Supported Model Families

Works with local GGUF models for Qwen, Gemma 4, gpt-oss, and other llama.cpp-compatible families.

Common examples:

  • Qwen text and vision families such as Qwen3-VL, Qwen3.5, and Qwen3.6
  • Gemma 4 GGUF models such as gemma-4-E2B, gemma-4-E4B, gemma-4-26b-a4b, and gemma-4-31b
  • OpenAI gpt-oss-20b and gpt-oss-120b

Notes:

  • For image workflows, choose a matching mmproj file from the same model family when the GGUF release provides one.
  • Gemma 4 text generation works well. Vision support depends on the specific GGUF and mmproj release, and can be less reliable on some Windows CUDA setups.
  • In this node, gpt-oss is used as a text model through llama.cpp-compatible GGUF releases.

Installation

ComfyUI Manager

Open ComfyUI Manager, choose Install Custom Nodes, search for LLM-text-processor_MOD, install it, then restart ComfyUI.

Manual Git Clone

Open a terminal in ComfyUI/custom_nodes and run:

git clone https://github.com/Eklipsis/ComfyUI-LLM-text-processor-MOD.git

Restart ComfyUI. The node appears under:

LLM Text Processor -> LLM-text-processor_MOD

No extra setup is needed for basic use.

llama.cpp

The node uses official llama.cpp release binaries. Automatic setup is currently available on:

Windows x64 + CUDA 13

Other platforms require manual setup.

The extension downloads llama.cpp only. It does not download model weights.

During automatic setup, the console shows download progress, total size when available, and current download speed so slow connections do not look like a freeze.

Model Placement

Put your GGUF files anywhere under:

ComfyUI/models/LLM

Example:

ComfyUI/models/LLM/My-Model/model-q4_k_m.gguf
ComfyUI/models/LLM/My-Model/mmproj-bf16.gguf

The model dropdown shows model .gguf files. The mmproj dropdown shows vision projector files and none.

For image workflows, choose the mmproj file that belongs to the selected model. You can connect up to 10 separate image inputs (image_1 through image_10); each input accepts either a single image or a ComfyUI image batch. All connected images are sent together in the same llama.cpp request.

System Prompt Presets

Create text files in:

ComfyUI/models/LLM/prompts

Example:

ComfyUI/models/LLM/prompts/captioner.txt

Each top-level .txt file appears in the system_prompt dropdown. Choose none to run without a system prompt.

Recommended Settings

These presets are a good starting point for common models and tasks.

Qwen

Qwen starting presets:

| Model family / use case | reasoning | temperature | top_p | top_k | repeat_penalty | | --- | --- | ---: | ---: | ---: | ---: | | Qwen3-VL Instruct | off | 0.7 | 0.8 | 20 | 1.0 | | Qwen3-VL Thinking | on | 0.6 | 0.95 | 20 | 1.0 | | Qwen3.5 / Qwen3.6 thinking, general tasks | on | 1.0 | 0.95 | 20 | 1.0 | | Qwen3.5 / Qwen3.6 thinking, precise coding | on | 0.6 | 0.95 | 20 | 1.0 | | Qwen3.5 / Qwen3.6 instruct, general tasks | off | 0.7 | 0.8 | 20 | 1.0 | | Qwen3.5 / Qwen3.6 instruct, reasoning tasks | off | 1.0 | 1.0 | 40 | 1.0 |

Reference: Qwen3 docs

Gemma 4

Gemma 4 starting preset:

| Model family / use case | reasoning | temperature | top_p | top_k | repeat_penalty | | --- | --- | ---: | ---: | ---: | ---: | | Gemma 4 it models, general tasks | off | 1.0 | 0.95 | 64 | 1.0 | | Gemma 4 it models, reasoning tasks | on | 1.0 | 0.95 | 64 | 1.0 | | Gemma 4 multimodal tasks | off | 1.0 | 0.95 | 64 | 1.0 |

Common Gemma 4 variants:

  • gemma-4-E2B
  • gemma-4-E4B
  • gemma-4-26b-a4b
  • gemma-4-31b

Gemma 4 supports configurable thinking modes across the family. For simple prompt writing, translation, captioning, and extraction, start with reasoning=off. For harder reasoning or coding tasks, try reasoning=on.

Reference:

gpt-oss

gpt-oss starting preset:

| Model family / use case | reasoning | temperature | top_p | top_k | repeat_penalty | | --- | --- | ---: | ---: | ---: | ---: | | gpt-oss-20b, direct answers and lower-latency local tasks | off | 1.0 | 1.0 | 20 | 1.0 | | gpt-oss-20b, reasoning-heavy tasks | on | 1.0 | 1.0 | 20 | 1.0 | | gpt-oss-120b, general purpose and stronger reasoning | on | 1.0 | 1.0 | 20 | 1.0 |

Use the preset as shown. Leave the other values at default unless you already know you want different sampling.

Common gpt-oss variants:

  • gpt-oss-20b
  • gpt-oss-120b

OpenAI describes gpt-oss-20b as the lower-latency option for local or specialized use cases, and gpt-oss-120b as the larger option for production, general purpose, and higher-reasoning workloads.

OpenAI also documents configurable reasoning effort for gpt-oss. This node does not expose the native low / medium / high control directly, so the presets above use the simpler reasoning toggle available here: start with off for direct answers, and try on for harder reasoning tasks.

Reference: gpt-oss docs

Node Inputs

| Input | Description | | --- | --- | | model | GGUF model file from ComfyUI/models/LLM. | | mmproj | Vision projector GGUF. Required when using one or more image inputs. | | system_prompt | Prompt preset from models/LLM/prompts, or none. | | prompt | User prompt sent to the selected model. | | max_tokens | Maximum generated tokens. | | temperature | Sampling temperature. Lower values are more deterministic. | | top_p | Nucleus sampling threshold. | | top_k | Top-K sampling cutoff. | | repeat_penalty | Penalty for repeated tokens. | | ctx_size | Context window size. Larger values use more memory. | | memory_mode | Advanced memory placement mode: auto, gpu_layers, cpu_moe_layers, or gpu_and_cpu_moe_layers. | | n_gpu_layers | Used only in gpu_layers and gpu_and_cpu_moe_layers modes. | | n_cpu_moe_layers | Used only in cpu_moe_layers and gpu_and_cpu_moe_layers modes. | | seed | Random seed. Use -1 for a random seed. | | timeout_seconds | Maximum runtime before generation is stopped. | | reasoning | Reasoning output mode: auto, on, or off. | | image_1 | Optional image input 1. Accepts a single image or a ComfyUI batch. | | image_2 | Optional image input 2. Accepts a single image or a ComfyUI batch. | | image_3 | Optional image input 3. Accepts a single image or a ComfyUI batch. | | image_4 | Optional image input 4. Accepts a single image or a ComfyUI batch. | | image_5 | Optional image input 5. Accepts a single image or a ComfyUI batch. | | image_6 | Optional image input 6. Accepts a single image or a ComfyUI batch. | | image_7 | Optional image input 7. Accepts a single image or a ComfyUI batch. | | image_8 | Optional image input 8. Accepts a single image or a ComfyUI batch. | | image_9 | Optional image input 9. Accepts a single image or a ComfyUI batch. | | image_10 | Optional image input 10. Accepts a single image or a ComfyUI batch. | | enable_processing | When enabled, the node runs normally. When disabled, the node forwards prompt directly to RESPONSE and skips all model checks and llama.cpp execution. | | extra_args | Optional advanced llama.cpp parameters. Leave empty for normal use. |

Node Outputs

| Output | Description | | --- | --- | | RESPONSE | Final model response with reasoning blocks removed, or the input prompt when enable_processing is disabled. | | REASONING | Extracted reasoning when present in model output. Empty when enable_processing is disabled. | | PERF | Prompt and generation speed reported by llama.cpp. Empty when enable_processing is disabled. |

Troubleshooting

No models appear

Place at least one .gguf model under:

ComfyUI/models/LLM

Then refresh or restart ComfyUI.

Image input fails

Make sure mmproj is not set to none and that the projector belongs to the same model family as the selected GGUF model.

llama.cpp setup fails

Check your internet connection and GitHub access, then run the node again.

Unsupported platform

Automatic llama.cpp setup currently supports Windows x64 CUDA 13 only.

Out of memory

Lower ctx_size first. If that is not enough, use a smaller model, a smaller quant, or adjust memory placement.

Generation takes too long

Try lowering max_tokens, reducing ctx_size, using a smaller GGUF model, or increasing timeout_seconds.

Use extra_args only if you already know which llama.cpp options your setup needs.

Response is empty or cut off

Increase max_tokens. This is especially important when reasoning is set to on or auto, because the model can spend part of the token budget on reasoning before it reaches the final answer. When using multiple images, see the Token & Context Recommendations section above.

Credits

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for details.