Nodes/ComfyUI-Qwen3VL-NightShift/Qwen3VL πŸ–€ NightShift
ComfyUI Node

Qwen3VL πŸ–€ NightShift

Chat with your images (and video) inside ComfyUI β€” no API, no key

By SmokingDormouseΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 1
Qwen3VL πŸ–€ NightShift
  • πŸ–ΌοΈ Image 1
  • πŸ–ΌοΈ Image 2
  • πŸ–ΌοΈ Image 3
  • πŸ–ΌοΈ Image 4
  • πŸŽ₯ Video
  • Response
β—„max_longer_edge768β–Ί
β—„model_name<no models found>β–Ί
β—„preset_system_promptβ€” Custom β€”β–Ί
β—„user_promptβ–Ί
β—„system_promptYou are a helpful assistant.β–Ί
β—„max_length256β–Ί
β—„temperature0.70β–Ί
β—„top_p0.90β–Ί
β—„num_beams1β–Ί
β—„repetition_penalty1.20β–Ί
β—„seed666β–Ί
β—„tf32trueβ–Ί
β—„attentionAutoβ–Ί
β—„torch_compilefalseβ–Ί
β—„keep_model_loadedtrueβ–Ί
β—„video_frames2β–Ί
β—„devicenvidia_gpuβ–Ί

This is the node you reach for when you want a local Qwen3-VL vision model to actually look at what's in your graph - and answer in plain text. No API call, no key, no separate LLM server. Drop in up to four images, a video, and a prompt, and it hands you back a string you can wire straight into another node.

The name is a lie in the best way: "NightShift" implies something running after hours, but what you get is a single all-in-one node that does everything the usual Qwen3VL setup needs four nodes to do - model loading, prompting, sampling, and image/video input all live in one box. That's the whole pitch. Where the more popular ComfyUI-QwenVL packs go heavy on auto-downloading GGUF quantizations, this one is deliberately simple: you point it at a folder and it loads.

Why you'd bother

Two real jobs, both covered by the presets it ships with. First, it's a prompt translator: feed it a raw idea and the built-in 🎨 Z-Image Prompt system prompt turns it into a clean text-to-image prompt, or 🎬 LTX-2.3 Video Prompt rewrites it into an image-to-video prompt with audio cues. That's the "LLM writes the prompt" workflow the community converged on for LLM-encoded models - and it fits here because Z-Image's text encoder is a Qwen3-VL. The node speaks its own encoder's language. Second, plain analysis: describe a frame, check what a character is wearing, or turn video frames into a caption. It uses a real chat template, so your prompt is an instruction/message, not a token bag - write sentences, not (booru:tags).

How it works

The node scans ComfyUI/models/llm/Qwen-VL/ at startup and populates the model_name dropdown from any subfolder containing a config.json. It loads through HuggingFace transformers - processor, tokenizer, and model are cached after first load, and IS_CHANGED hashing means ComfyUI skips re-running when nothing changed. Inference is BF16 with Flash Attention 2 if installed and an automatic SDPA fallback, and it respects ComfyUI's cancel button mid-generation. Inputs get resized so the longer edge hits max_longer_edge (default 768, set 0 to disable) - your main lever for cutting vision-token count and VRAM.

The inputs that matter

Despite the wall of widgets, you'll only set a handful:

  • model_name - which model folder to load. See below.
  • preset_system_prompt - - Custom - (uses the system_prompt widget), or one of the two writer presets.
  • user_prompt - the actual question. Always used, even with a preset.
  • max_longer_edge - resize cap; lower it on small GPUs.

The rest have sane defaults. One gotcha: the widget is called max_length but it actually controls max_new_tokens internally - the name is kept for saved-workflow compatibility, so don't be confused when your 4096 "context" isn't as big as it looks. video_frames (default 2) samples frames uniformly from a video batch, temperature 0 gives deterministic output, num_beams >1 enables beam search (which disables the progress bar). The output is a single Response string - wire it into a text-display node or into the prompt input of your Z-Image or LTX loader.

Installing it

Install via ComfyUI Manager (search "Qwen3VL NightShift") or:

cd ComfyUI/custom_nodes
git clone https://github.com/SmokingDormouse/ComfyUI-Qwen3VL-NightShift.git

Then restart. There's no requirements.txt - the node leans on your existing environment, so you need a transformers recent enough for the Qwen3-VL architecture (upgrade with pip install -U transformers if the import fails at startup). Flash-attn is optional and auto-detected.

Now the model. Grab a Qwen3-VL folder and drop it in:

ComfyUI/models/llm/Qwen-VL/Qwen3-VL-4B-Instruct/

The README recommends the abliterated Huihui-AI/Huihui-Qwen3-VL-4B-Instruct-abliterated - a real, popular community favorite that skips most of the safety refusal fluff. The 4B is around 8–9GB in BF16 and fits comfortably on a 12GB card. The node is local_files_only, so the folder must be complete - it won't quietly download missing shards for you.

Common issues

  • model_name shows "<no models found>" - the folder isn't in ComfyUI/models/llm/Qwen-VL/ or its config.json is missing. Each model is its own subfolder; the node doesn't scan recursively.
  • Startup crash mentioning transformers - your install's transformers is too old for Qwen3-VL. Upgrade it.
  • Everything hangs at 0% after a ComfyUI update - this is a known Qwen3-VL-in-ComfyUI family quirk, not this node's bug; people fix it by disabling pinned memory (--disable-pinned-memory in your launch args).
  • VRAM pressure - lower max_longer_edge (fewer vision tokens) and set keep_model_loaded off if you're swapping between this and heavy samplers. And flash-attn is worth the install pain on Ampere+; the speedup is real, but SDPA works fine until you bother.

It's a small, quiet pack with no community buzz yet, and that's fine - for a one-node job it does exactly what it says.

CategoryNightShift/Qwen3VL

Inputs (22)

NameTypeDefaultDescription
max_longer_edgeINT7680–4096β€”
model_nameCOMBO<no models found>1 options: <no models found>
preset_system_promptCOMBOβ€” Custom β€”3 options: β€” Custom β€”, 🎨 Z-Image Prompt, 🎬 LTX-2.3 Video Prompt
user_promptSTRINGβ€”
system_promptSTRINGYou are a helpful assistant.β€”
max_lengthINT2561–4096β€”
temperatureFLOAT0.700–2β€”
top_pFLOAT0.900–1β€”
num_beamsINT11–8β€”
repetition_penaltyFLOAT1.200.5–2β€”
seedINT6660–18446744073709550000β€”
tf32BOOLEANtrueβ€”
attentionCOMBOAuto4 options: Auto, flash_attention_2, sdpa, eager
torch_compileBOOLEANfalseβ€”
keep_model_loadedBOOLEANtrueβ€”
video_framesINT22–256β€”
deviceCOMBOnvidia_gpu2 options: nvidia_gpu, cpu
πŸ–ΌοΈ Image 1optIMAGEβ€”
πŸ–ΌοΈ Image 2optIMAGEβ€”
πŸ–ΌοΈ Image 3optIMAGEβ€”
πŸ–ΌοΈ Image 4optIMAGEβ€”
πŸŽ₯ VideooptIMAGEβ€”

Outputs (1)

NameTypeDescription
ResponseSTRINGβ€”