Qwen3VL π€ NightShift
Chat with your images (and video) inside ComfyUI β no API, no key
- πΌοΈ Image 1
- πΌοΈ Image 2
- πΌοΈ Image 3
- πΌοΈ Image 4
- π₯ Video
- Response
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 thesystem_promptwidget), 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_nameshows "<no models found>" - the folder isn't inComfyUI/models/llm/Qwen-VL/or itsconfig.jsonis 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-memoryin your launch args). - VRAM pressure - lower
max_longer_edge(fewer vision tokens) and setkeep_model_loadedoff if you're swapping between this and heavy samplers. Andflash-attnis 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.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| max_longer_edge | INT | 7680β4096 | β |
| model_name | COMBO | <no models found> | 1 options: <no models found> |
| preset_system_prompt | COMBO | β Custom β | 3 options: β Custom β, π¨ Z-Image Prompt, π¬ LTX-2.3 Video Prompt |
| user_prompt | STRING | β | |
| system_prompt | STRING | You are a helpful assistant. | β |
| max_length | INT | 2561β4096 | β |
| temperature | FLOAT | 0.700β2 | β |
| top_p | FLOAT | 0.900β1 | β |
| num_beams | INT | 11β8 | β |
| repetition_penalty | FLOAT | 1.200.5β2 | β |
| seed | INT | 6660β18446744073709550000 | β |
| tf32 | BOOLEAN | true | β |
| attention | COMBO | Auto | 4 options: Auto, flash_attention_2, sdpa, eager |
| torch_compile | BOOLEAN | false | β |
| keep_model_loaded | BOOLEAN | true | β |
| video_frames | INT | 22β256 | β |
| device | COMBO | nvidia_gpu | 2 options: nvidia_gpu, cpu |
| πΌοΈ Image 1opt | IMAGE | β | |
| πΌοΈ Image 2opt | IMAGE | β | |
| πΌοΈ Image 3opt | IMAGE | β | |
| πΌοΈ Image 4opt | IMAGE | β | |
| π₯ Videoopt | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Response | STRING | β |