๐ง VRGDG Qwen GGUF ๐ง
A Qwen brain inside ComfyUI, no API key, no Ollama server
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image15
- image16
- image17
- image18
- image19
- image20
- image21
- image22
- image23
- image24
- text
- used_model
- status
Every music-video workflow VRGameDevGirl ships needs a writing step: rough idea in, cinematic LTX or Wan prompt out, or a caption for a LoRA training set. The VRGDG Qwen GGUF node is that brain - it loads a Qwen GGUF model inside the graph and runs it through llama.cpp. No API key, no external Ollama server, nothing leaving your machine. That "run any GGUF directly as a Comfy node" pattern is exactly what people keep asking for, and this is a working version of it.
It's worth knowing the name is a slight lie in the other direction: nothing here is Qwen the image model. This is the language model - Qwen3-class - being used as a text worker. It doesn't generate frames, it writes the prompts and captions that generate frames.
How it works
Under the hood it's a thin wrapper around llama-cpp-python. Pick a model, and the node resolves it to a .gguf file (local path, local folder, or Hugging Face repo), hands it to llama.cpp's Llama() loader, and runs create_chat_completion. The loaded model is cached per file + context + GPU-layer + thread combo, so a long workflow doesn't reload it on every pass.
Two details separate this from a raw llama.cpp call. First, it's Qwen-aware: the chat template uses Qwen's native <|im_start|>/<|im_end|> format, and when enable_thinking is on it opens a <think> block so the model can reason - then strips that block out of what it returns, so you get the answer, not the monologue. Second, when you feed it images it builds a multimodal handler around the same loader, using a separate mmproj projector file the way vision Qwen GGUFs require.
The inputs that matter
model_preset- defaults tounsloth/Qwen3.8-27B-GGUF. That's a ~27B model; it will be the VRAM hog of your workflow. The other option iscustom, which lets you pointcustom_model_idat any local.gguf, folder, or repo.gguf_filename- set this. The preset repo ships thirty quant files; if you don't name one, the node can't pick.Qwen3.8-27B-Q4_K_M.ggufis the usual compromise,Q8_0if it fits.task_preset-text_to_image,text_to_video,image_to_video,image_edit,captioner_training, orcustom. Each injects a long, well-built instruction block, so all you type inuser_inputis the rough idea.trigger_wordonly matters for the captioner preset (LoRA training).image_count- how many of the 24image1โimage24inputs to show. Needed for image_edit/captioning; the projector file is only required when images are actually attached.download_if_missing- lets it fetch a missing GGUF intoComfyUI/models/LLM/GGUF. The first run of a 27B quant is a multi-GB download; don't mistake that for a hang.enable_thinking- off is faster and cleaner for prompt writing. Flip it on when the task genuinely benefits from reasoning.
Flip advanced to reveal n_ctx (default 8192), n_gpu_layers (default 99), n_threads, temperature, top_p, and max_new_tokens. Leave them alone until something misbehaves.
Outputs: text (the prompt/caption - wire it into your text encoder or a display node), used_model (the exact file it loaded, handy for multi-model setups), and status (ok or error: โฆ).
Installing it
ComfyUI Manager is the easy path - search vrgamedev and install, or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
Restart ComfyUI and hard-refresh the browser page. This pack's requirements.txt includes llama-cpp-python and huggingface_hub, which is where the real friction lives: on Windows portable builds you'll want Cython and scikit-build-core installed first, and llama-cpp-python may need a working CMake/Ninja and C++ compiler when no prebuilt wheel exists. Python 3.12 beats 3.13 for older portable setups.
Where people get burned
- VRAM math. A 27B Qwen plus LTX or Wan on one card is a lot. The node has an
unload_after_runtoggle that frees the model after each pass - use it, or your sampler will start OOMing on the first frame. - The projector filename. The default preset expects
qwen-mmproj-BF16.gguf, but the file actually in the repo ismmproj-BF16.gguf. If vision-mode download 404s, setmmproj_filenameto the real name. - Download errors. Missing files surface as clear errors; a
403means a gated repo and a missinghf_token, not a broken install. - Multi-quant repos refuse to auto-pick - that's the
gguf_filenamerequirement above, not a bug.
One last thing: an LLM node is exactly the shape of the thing that got weaponized in the ComfyUI_LLMVISION malware incident, so the usual rule applies - it's open AGPL source, and you should glance at what you're running. Once it's up, it's the most useful prompt writer in the pack, and it never bills you per call.
Inputs (47)
| Name | Type | Default | Description |
|---|---|---|---|
| model_preset | COMBO | unsloth/Qwen3.8-27B-GGUF | Choose the Qwen GGUF repo, or select custom and provide a local .gguf file/folder or another Hugging Face repo. |
| custom_model_id | STRING | Optional override. Can be a local .gguf file path, a local folder containing GGUF files, or a Hugging Face repo id. | |
| gguf_filename | STRING | Optional GGUF filename to use inside the repo/folder. Strongly recommended when a repo has multiple quant files. | |
| mmproj_filename | STRING | Optional multimodal projector (.gguf). Required only for Qwen vision GGUFs when image inputs are used. | |
| task_preset | COMBO | text_to_image | Select a task preset with built-in instructions. |
| custom_instructions | STRING | Used only when task_preset is custom. Enter your own full instruction block. | |
| user_input | STRING | Your task details and creative direction for the selected preset. | |
| trigger_word | STRING | Optional LoRA/training trigger token. Used only by Captioner preset. | |
| image_count | INT | 00โ24 | How many optional image inputs to show on the node. |
| download_if_missing | BOOLEAN | false | If enabled, a missing GGUF file can be downloaded to ComfyUI/models/LLM/GGUF. |
| advanced | BOOLEAN | false | Show advanced GGUF runtime controls such as context, GPU layers, threads, sampler, and token limits. |
| unload_after_run | BOOLEAN | false | If enabled, unload the GGUF model from cache after this run to free RAM/VRAM. |
| hf_token | STRING | Optional Hugging Face access token for private or gated repos. | |
| n_ctx | INT | 8192512โ131072 | GGUF context window. |
| n_gpu_layers | INT | 99-1โ200 | How many layers to offload to GPU. Use -1 to offload all supported layers. |
| n_threads | INT | 81โ128 | CPU threads used by llama.cpp. |
| chat_format | STRING | Optional llama.cpp chat format override. Leave blank to use the model default. | |
| temperature | FLOAT | 0.600โ2 | Higher = more creative variation, lower = more deterministic output. |
| top_p | FLOAT | 0.950โ1 | Nucleus sampling cutoff. |
| max_new_tokens | INT | 80032โ32000 | Maximum number of output tokens. |
| model_file | COMBO | [No Qwen GGUF found in models/LLM] | Qwen GGUF files found under ComfyUI/models/LLM. Use custom_model_id for another path or Hugging Face repo. |
| mmproj_file | COMBO | [No Qwen mmproj GGUF found in models/LLM] | Optional Qwen vision projector found under ComfyUI/models/LLM. |
| enable_thinking | BOOLEAN | false | Qwen reasoning mode. Disable for a direct answer with lower latency and fewer output tokens. |
| image1opt | IMAGE | Optional reference image input. | |
| image2opt | IMAGE | Optional reference image input. | |
| image3opt | IMAGE | Optional reference image input. | |
| image4opt | IMAGE | Optional reference image input. | |
| image5opt | IMAGE | Optional reference image input. | |
| image6opt | IMAGE | Optional reference image input. | |
| image7opt | IMAGE | Optional reference image input. | |
| image8opt | IMAGE | Optional reference image input. | |
| image9opt | IMAGE | Optional reference image input. | |
| image10opt | IMAGE | Optional reference image input. | |
| image11opt | IMAGE | Optional reference image input. | |
| image12opt | IMAGE | Optional reference image input. | |
| image13opt | IMAGE | Optional reference image input. | |
| image14opt | IMAGE | Optional reference image input. | |
| image15opt | IMAGE | Optional reference image input. | |
| image16opt | IMAGE | Optional reference image input. | |
| image17opt | IMAGE | Optional reference image input. | |
| image18opt | IMAGE | Optional reference image input. | |
| image19opt | IMAGE | Optional reference image input. | |
| image20opt | IMAGE | Optional reference image input. | |
| image21opt | IMAGE | Optional reference image input. | |
| image22opt | IMAGE | Optional reference image input. | |
| image23opt | IMAGE | Optional reference image input. | |
| image24opt | IMAGE | Optional reference image input. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| text | STRING | โ |
| used_model | STRING | โ |
| status | STRING | โ |