VOID Gemma 4 E2B Video Prompt
The pack's built-in VLM, heavy but local
- video
- text
Every VOID workflow needs a vision-language model to answer the "what happens if I remove this object?" question that VOID Prepare VLM Analysis sets up. This node is the pack's own VLM: it loads Google's gemma-4-e2b-it through Hugging Face transformers and asks it to describe a video. In the example workflow it's the middle of the chain - VoidPrepareVLMAnalysis feeds it frames and a prompt, and its text output feeds VoidParseVLMAnalysis.
The honest framing: this is the heavy path. Gemma 4 is a real multimodal model - think multiple GB of weights downloaded on first use, and it runs through transformers rather than any lightweight wrapper. If you have a Qwen-VL setup you already love, the Prepare node's qwen_input_frames output was literally designed for it, and you can skip this node entirely. This one exists so the pack is self-contained.
How it works
It's a video-in-LLM loop: sample up to max_frames frames from your video (evenly spaced if there are more frames than that - the spacing logic even guarantees the last frame is included), convert them to PIL images, build a chat message with the frames as a video content item plus your text prompt, and run greedy generation through model.generate(). No sampling, no temperature - deterministic output for a given input.
The model loads once and stays cached for the session; after each run it's offloaded back to CPU and the CUDA cache is emptied, so it doesn't squat on VRAM between executions. Two environment variables let you override things without editing code: VOID_GEMMA4_MODEL_ID (the HF model id) and VOID_GEMMA4_MAX_FRAMES / VOID_GEMMA4_MAX_NEW_TOKENS (defaults).
The inputs that matter
video(IMAGE) - the frame batch to analyze. In the example workflow this isVoidPrepareVLMAnalysis'sqwen_input_frames(the gridded frames + masked first frame), so the model sees the coordinate system.prompt(STRING, default "Describe this video in detail.") - the actual question. Wire invlm_promptfrom the Prepare node if you want the full structured analysis; a plain describe prompt works too but won't produce the JSON the Parse node expects.max_frames(INT, default 24) - frames sampled for the model. More frames = better temporal understanding, slower, and some models choke on very long sequences.max_new_tokens(INT, default 512) - generation budget. The VOID analysis JSON is long; 512 is a reasonable floor, bump it if you get truncated output.
Output: a single text (STRING) - the model's answer, meant to flow into VOID Parse VLM Analysis.
Install & gotchas
Standard pack install (Manager → "ComfyUI-NetflixVoid", or clone into custom_nodes), plus a separate dependency: this node needs transformers, Pillow, and a compatible PyTorch - the code raises a clear "requires transformers, Pillow" error if they're missing. Then a multi-GB model download from Hugging Face on first use, and you need enough VRAM to hold Gemma 4 while it runs (it offloads after, but during generation it's resident). It's deterministic (greedy), so if the answer is bad, re-queuing won't help - change the prompt or the model. And remember: if an empty response comes back, the node raises rather than silently passing you an empty string - which is annoying but better than feeding an empty analysis downstream.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| video | IMAGE | — | |
| prompt | STRING | Describe this video in detail. | — |
| max_frames | INT | 241–256 | — |
| max_new_tokens | INT | 5121–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |