Nodes/VRGameDevGirl Video Enhancement Nodes/๐Ÿง  VRGDG Qwen GGUF ๐Ÿง 
ComfyUI Node

๐Ÿง  VRGDG Qwen GGUF ๐Ÿง 

A Qwen brain inside ComfyUI, no API key, no Ollama server

By vrgamegirl19ยทCreated about a year agoยทUpdated about 7 hours agoยท 718
๐Ÿง  VRGDG Qwen GGUF ๐Ÿง 
  • 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
โ—„model_presetunsloth/Qwen3.8-27B-GGUFโ–บ
โ—„custom_model_idโ–บ
โ—„gguf_filenameโ–บ
โ—„mmproj_filenameโ–บ
โ—„task_presettext_to_imageโ–บ
โ—„custom_instructionsโ–บ
โ—„user_inputโ–บ
โ—„trigger_wordโ–บ
โ—„image_count0โ–บ
โ—„download_if_missingfalseโ–บ
โ—„advancedfalseโ–บ
โ—„unload_after_runfalseโ–บ
โ—„hf_tokenโ–บ
โ—„n_ctx8192โ–บ
โ—„n_gpu_layers99โ–บ
โ—„n_threads8โ–บ
โ—„chat_formatโ–บ
โ—„temperature0.60โ–บ
โ—„top_p0.95โ–บ
โ—„max_new_tokens800โ–บ
โ—„model_file[No Qwen GGUF found in models/LLM]โ–บ
โ—„mmproj_file[No Qwen mmproj GGUF found in models/LLM]โ–บ
โ—„enable_thinkingfalseโ–บ

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 to unsloth/Qwen3.8-27B-GGUF. That's a ~27B model; it will be the VRAM hog of your workflow. The other option is custom, which lets you point custom_model_id at 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.gguf is the usual compromise, Q8_0 if it fits.
  • task_preset - text_to_image, text_to_video, image_to_video, image_edit, captioner_training, or custom. Each injects a long, well-built instruction block, so all you type in user_input is the rough idea. trigger_word only matters for the captioner preset (LoRA training).
  • image_count - how many of the 24 image1โ€“image24 inputs 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 into ComfyUI/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_run toggle 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 is mmproj-BF16.gguf. If vision-mode download 404s, set mmproj_filename to the real name.
  • Download errors. Missing files surface as clear errors; a 403 means a gated repo and a missing hf_token, not a broken install.
  • Multi-quant repos refuse to auto-pick - that's the gguf_filename requirement 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.

CategoryVRGDG/LLM

Inputs (47)

NameTypeDefaultDescription
model_presetCOMBOunsloth/Qwen3.8-27B-GGUFChoose the Qwen GGUF repo, or select custom and provide a local .gguf file/folder or another Hugging Face repo.
custom_model_idSTRINGOptional override. Can be a local .gguf file path, a local folder containing GGUF files, or a Hugging Face repo id.
gguf_filenameSTRINGOptional GGUF filename to use inside the repo/folder. Strongly recommended when a repo has multiple quant files.
mmproj_filenameSTRINGOptional multimodal projector (.gguf). Required only for Qwen vision GGUFs when image inputs are used.
task_presetCOMBOtext_to_imageSelect a task preset with built-in instructions.
custom_instructionsSTRINGUsed only when task_preset is custom. Enter your own full instruction block.
user_inputSTRINGYour task details and creative direction for the selected preset.
trigger_wordSTRINGOptional LoRA/training trigger token. Used only by Captioner preset.
image_countINT00โ€“24How many optional image inputs to show on the node.
download_if_missingBOOLEANfalseIf enabled, a missing GGUF file can be downloaded to ComfyUI/models/LLM/GGUF.
advancedBOOLEANfalseShow advanced GGUF runtime controls such as context, GPU layers, threads, sampler, and token limits.
unload_after_runBOOLEANfalseIf enabled, unload the GGUF model from cache after this run to free RAM/VRAM.
hf_tokenSTRINGOptional Hugging Face access token for private or gated repos.
n_ctxINT8192512โ€“131072GGUF context window.
n_gpu_layersINT99-1โ€“200How many layers to offload to GPU. Use -1 to offload all supported layers.
n_threadsINT81โ€“128CPU threads used by llama.cpp.
chat_formatSTRINGOptional llama.cpp chat format override. Leave blank to use the model default.
temperatureFLOAT0.600โ€“2Higher = more creative variation, lower = more deterministic output.
top_pFLOAT0.950โ€“1Nucleus sampling cutoff.
max_new_tokensINT80032โ€“32000Maximum number of output tokens.
model_fileCOMBO[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_fileCOMBO[No Qwen mmproj GGUF found in models/LLM]Optional Qwen vision projector found under ComfyUI/models/LLM.
enable_thinkingBOOLEANfalseQwen reasoning mode. Disable for a direct answer with lower latency and fewer output tokens.
image1optIMAGEOptional reference image input.
image2optIMAGEOptional reference image input.
image3optIMAGEOptional reference image input.
image4optIMAGEOptional reference image input.
image5optIMAGEOptional reference image input.
image6optIMAGEOptional reference image input.
image7optIMAGEOptional reference image input.
image8optIMAGEOptional reference image input.
image9optIMAGEOptional reference image input.
image10optIMAGEOptional reference image input.
image11optIMAGEOptional reference image input.
image12optIMAGEOptional reference image input.
image13optIMAGEOptional reference image input.
image14optIMAGEOptional reference image input.
image15optIMAGEOptional reference image input.
image16optIMAGEOptional reference image input.
image17optIMAGEOptional reference image input.
image18optIMAGEOptional reference image input.
image19optIMAGEOptional reference image input.
image20optIMAGEOptional reference image input.
image21optIMAGEOptional reference image input.
image22optIMAGEOptional reference image input.
image23optIMAGEOptional reference image input.
image24optIMAGEOptional reference image input.

Outputs (3)

NameTypeDescription
textSTRINGโ€”
used_modelSTRINGโ€”
statusSTRINGโ€”