ComfyUI Extension: QwenVL-Mod: Enhanced Vision-Language
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.
Enhanced QwenVL node with Smart Prompt Caching, multilingual WAN 2.2 presets, comprehensive visual style detection, and NSFW support. Latest v2.0.8 with bug fixes and stability improvements for professional multimodal workflows.
Looking for a different extension?
Custom Nodes (5)
README
QwenVL-Mod for ComfyUI
๐ API Support & Troubleshooting
Having issues with ComfyUI API? We've got you covered!
๐ Quick API Help
- ๐ API Guide - Complete API documentation
- ๐ ๏ธ Debug Script - Automated API diagnostics
- ๐ฏ Example Workflows - Ready-to-use API templates
๐ง Common API Issues
| Issue | Solution |
|-------|----------|
| "node not found" | Check QwenVL-Mod installation |
| "model not found" | Verify model files in /models/ |
| "invalid input" | Check parameter formats |
| "queue full" | Wait for current jobs |
๐งช Quick Debug
# Run API diagnostics
python debug_api.py --url http://localhost:18188
# Check available nodes
curl http://localhost:18188/object_info
# Test simple workflow
curl -X POST http://localhost:18188/prompt -d @test_workflow.json
๐ Need More Help?
Ask user for:
- Error message (exact text)
- Workflow JSON (sanitized)
- Debug output (from debug_api.py)
- ComfyUI logs (API section)
The ComfyUI-QwenVL custom node integrates powerful Qwen-VL series of vision-language models (LVLMs) from Alibaba Cloud, including latest Qwen3-VL and Qwen2.5-VL, plus GGUF backends and text-only Qwen3 support. This advanced node enables seamless multimodal AI capabilities within your ComfyUI workflows, allowing for efficient text generation, image understanding, and video analysis.
<img width="749" height="513" alt="Qwen3-VL-Mod" src="https://github.com/user-attachments/assets/0f10b887-1953-4923-b813-37ccacb8a9aa" />๐ฐ News & Updates
- 2026/07/09: v2.3 ๐ฌ New LTX 2.3 Presets + Multilingual Support. [Update]
๐ฌ LTX 2.3 Presets: New specialized presets for LTX 2.3 I2V and T2V with official prompting guides. ๐ Multilingual Support: Complete multilingual support for all LTX 2.3 presets. ๐ Prompting Guide: Core Actions, Visual Details, Audio for optimized video generation. ๐ฏ Simplified Format: No timeline, single fluid paragraph max 200 words. ๐ฅ NSFW Support: Full NSFW support for both LTX 2.3 presets.
- 2026/03/06: v2.2.4 ๐ง Critical OOM Fix + Quantization Removal. [Update]
๐จ BitsAndBytes Disabled: Removed problematic quantization causing OOM on RTX 5090.
โ FP16 Only: All HF nodes now use stable FP16 (~6GB VRAM).
๐ฏ Cleaner Interface: Removed quantization dropdown - use GGUF nodes for quantized models.
๐ง Both Nodes Fixed: Applied fixes to Standard and Advanced nodes with consistent parameters.
๐ก User Guidance: HF nodes for quality, GGUF nodes for quantization - clear separation.
- 2026/02/27: v2.2.3 ๐ง CUDA 13 Compatibility Fix + Redundancy Removal. [Update]
๐ง Removed unload_after_run: Eliminated redundant checkbox from all QwenVL nodes to prevent CUDA 13 conflicts.
๐ Fixed Parameter Errors: Resolved "missing 1 required positional argument: unload_after_run" errors in all nodes.
๐ฏ Simplified Interface: Cleaner node interface without redundant parameters.
๐ง VRAM Cleanup Node: Maintained for manual cleanup when needed.
๐ Community Credits: Thanks to user feedback that identified redundancy and parameter issues.
- 2026/02/27: v2.2.3 ๐ Critical T2V/I2V Fixes + ComfyUI Optimizations. [Update]
๐ Batch Processing: Fixed critical T2V โ GGUF issue with batch images from video generation.
๐ Same Model Reuse: Resolved conflict when using same model between T2V and I2V nodes.
โ๏ธ Flash Attention 2: Added Flash Attention 2 support for performance boost on compatible hardware.
โ๏ธ ComfyUI Args: Optimized startup arguments with validated experimental features.
๐ง keep_model_loaded: Added missing parameter to PromptEnhancer for consistent memory management.
๐ณ Final Docker Build: Optimized build with all fixes and maximum performance.
- 2026/02/18: v2.2.1 ๐ง Critical GGUF VRAM Fix + Docker Optimized. [Update]
๐ง GGUF VRAM Fix: Resolved critical VRAM leak issue causing crashes after 2 executions.
๐งน Aggressive Cleanup: Implemented complete VRAM cleanup for all GGUF nodes (AILab_QwenVL_GGUF and PromptEnhancer).
๐ Stable Performance: GGUF nodes now work reliably without VRAM accumulation.
๐ณ Docker Enhanced: Updated Dockerfiles with RunPod-tested methods for Jupyter and FileBrowser.
๐ ComfyUI Latest: Always latest stable version without manual updates.
๐ก Complete SSH: Server + client SSH for full networking functionality.
๐ฏ Jupyter Terminal: Adopted RunPod method for working terminal.
- 2026/02/15: v2.2.0 ๐ฌ WAN 2.2 Story Generation System. [Update]
๐ฌ Story Generation: Complete 4-segment video story generation with WAN 2.2
๐ Auto-Split Node: Intelligent prompt splitting for continuous 20-second videos
๐ Show Text Node: Built-in text display node without external dependencies
๐ฏ Enhanced Prompts: Optimized WAN 2.2 NSFW Story prompts with better formatting
โก Performance: Optimized context settings for 8B models (65,536 tokens)
๐ณ Docker Ready: Complete Story system integrated in Docker containers
๐จ Workflows: Ready-to-use WAN 2.2 Story and T2V workflows included
- 2026/02/14: v2.1.0 User-Friendly Keep Last Prompt Feature. [Update]
[!NOTE]
- 2026/02/12: v2.0.9 Bypass Mode parameter for prompt persistence. [Update]
๐๏ธ Bypass Mode: New
bypass_modeparameter allows maintaining previously generated prompts without regeneration.
๐ Smart Cache: When bypass mode is enabled, nodes retrieve the most recent cached prompt for the current model.
๐ฏ Perfect Workflow: Generate prompts once, then enable bypass mode to preserve them while changing inputs.
โก Zero Resource Usage: Bypass mode consumes no computational resources - instant response.
๐ Universal Feature: Available across all nodes (HF, GGUF, PromptEnhancer, Advanced variants).
๐ฎ Simple Control: Just toggle the bypass_mode checkbox to enable/disable prompt persistence.
- 2026/02/06: v2.0.8 Bug fixes and stability improvements. [Update]
[!NOTE]
๐ Bug Fixes: Fixed JSON syntax error in system prompts and undefined variable issues.
๐ Multilingual Support: Complete multilingual support added to all WAN 2.2 presets.
๐จ Style Detection: Enhanced visual style detection for anime, 3D, pixel art, and more.
๐ง Stability: Reverted problematic fixed seed improvements to maintain stable operation.
๐ Documentation: Updated README and changelog with today's improvements.
- 2026/02/04: v2.0.7 Smart prompt caching system with Fixed Seed Mode. [Update]
[!NOTE]
๐ง Smart Caching: Automatic prompt caching prevents regeneration of identical prompts.
๐ Fixed Seed Mode: Set any fixed seed value to maintain consistent prompts regardless of media variations.
โก Performance Boost: Instant response for cached prompts with zero model loading time.
๐ง Code Maintenance: Removed deprecated parameters across all download functions for future compatibility.
๐ GGUF Enhancement: Increased default context size from 8192 to 32768 for better model utilization.
๐ Universal Caching: Fixed Seed Mode and smart caching now available across all nodes (HF, GGUF, PromptEnhancer).
๐ฏ Simplified Logic: Streamlined caching system that always includes seed for predictable behavior across all seed values.
๐ฅ Version 2.1.0 - Enhanced NSFW Support & Lighting Accuracy
- ๐ฅ Stronger NSFW Instructions: Enhanced system prompts with explicit directives for uncensored content generation
- ๐ฆ Fixed Lighting Invention: Corrected AI tendency to add lights not present in source images
- ๐ฏ Improved Accuracy: Better content fidelity for both NSFW descriptions and lighting analysis
- ๐ Updated GGUF Models: Replaced noctrex models with mradermacher v2/v3 variants for better performance
- ๐ฆ Enhanced Model Selection: Added Josiefied-Qwen3-VL-4B-Instruct-abliterated-beta-v1 (HF only) (HF, GGUF, PromptEnhancer).
- 2026/02/03: v2.0.6 Professional cinematography enhancement for all WAN 2.2 presets. [Update]
[!NOTE]
๐ฌ Professional Specs: All WAN 2.2 presets now include comprehensive cinematography specifications.
๐น Technical Details: Light sources, shot types, lens specs, camera movements, color tone requirements.
๐ฏ Consistent Branding: Updated preset names with WAN family branding for better organization.
- 2026/03/13: v2.2.4 ๐ฌ Critical I2V Timeline Fixes & NSFW Presets Optimization. [Update]
๐ฌ I2V Timeline (20s) Critical Fixes:
- โ Style Coherence: Fixed AI changing animeโrealism mid-sequence
- โ Character Stability: Fixed characters disappearing/appearing incorrectly
- โ Natural Lighting: Fixed AI adding artificial lights not in image
- โ Timeline Structure: Fixed continuous numbering (6,7,8...) instead of 0-5 restart
- โ Format Consistency: Fixed missing parentheses and unwanted labels
- ๐ง All 8 NSFW Presets: Complete specifications + emoji display restored
- ๐ Token Settings Guide: Comprehensive workflow note for optimal parameters
- 2026/02/01: v2.0.5 Extended Storyboard preset added for WAN 2.2 format continuity. [Update]
[!NOTE]
๐ฌ Extended Storyboard: New preset for seamless storyboard-to-storyboard generation with timeline format.
๐ Continuity Focus: Each paragraph repeats previous content for smooth transitions.
๐ฏ WAN 2.2 Compatible: Same timeline structure and NSFW support as I2V preset.
- 2026/02/01: v2.0.4 Stability update - removed SageAttention for better compatibility and model output reliability. [Update]
[!NOTE]
๐ง Flash Attention 2: Still available for 2-3x speedup on compatible hardware.
๐ก๏ธ Enhanced Stability: Clean attention pipeline with SDPA as reliable fallback.
- 2026/02/01: v2.0.3 SageAttention compatibility fix for proper patching across transformer versions. [Update]
[!NOTE]
๐ง Critical Fix: Resolved AttributeError preventing Flash Attention 2 from working with certain transformer versions.
โก Performance Restored: 2-5x speedup now works correctly with 8-bit quantization on compatible hardware.
- 2026/02/01: v2.0.2 Enhanced model accessibility, improved custom prompt logic, and expanded NSFW content generation. [Update]
[!NOTE]
๐ Free Abliterated Models: Added token-free uncensored models as defaults for better accessibility.
๐ง Custom Prompt Fix: Now combines with preset templates instead of replacing them across all nodes.
๐ Enhanced NSFW: Comprehensive descriptions for adult content generation with detailed act specifications.
๐ฌ WAN 2.2 Priority: Moved video generation preset to top position for faster workflow access.
- 2026/01/30: v2.0.1-enhanced Added Flash Attention 2 support and WAN 2.2 integration. [Update]
[!NOTE]
๐ Flash Attention 2: 2-5x performance boost with 8-bit quantized attention for RTX 30+ GPUs.
๐ฌ WAN 2.2 Integration: New specialized prompts for cinematic video generation - convert images/videos to 5-second timeline descriptions (I2V) or text to video (T2V) with professional scene direction.
- 2025/12/22: v2.0.0 Added GGUF supported nodes and Prompt Enhancer nodes. [Update]
[!IMPORTANT]
Install llama-cpp-python before running GGUF nodes instruction
- 2025/11/10: v1.1.0 Runtime overhaul with attention-mode selector, flash-attn auto detection, smarter caching, and quantization/torch.compile controls in both nodes. [Update]
- 2025/10/31: v1.0.4 Custom Models Supported [Update]
- 2025/10/22: v1.0.3 Models list updated [Update]
- 2025/10/17: v1.0.0 Initial Release
- Support for Qwen3-VL and Qwen2.5-VL series models.
- Automatic model downloading from Hugging Face.
- On-the-fly quantization (4-bit, 8-bit, FP16).
- Preset and Custom Prompt system for flexible and easy use.
- Includes both a standard and an advanced node for users of all levels.
- Hardware-aware safeguards for FP8 model compatibility.
- Image and Video (frame sequence) input support.
- "Keep Model Loaded" option for improved performance on sequential runs.
- Seed parameter for reproducible generation.
โจ Features
- Standard & Advanced Nodes: Includes a simple QwenVL node for quick use and a QwenVL (Advanced) node with fine-grained control over generation.
- Prompt Enhancers: Dedicated text-only prompt enhancers for both HF and GGUF backends.
- Preset & Custom Prompts: Choose from a list of convenient preset prompts or write your own for full control. Custom prompts now combine with preset templates for enhanced flexibility.
- Smart Prompt Caching: Automatic caching system prevents regeneration of identical prompts, dramatically improving performance for repeated inputs. Cache persists across ComfyUI restarts.
- ๐๏ธ Bypass Mode: New
bypass_modeparameter allows maintaining previously generated prompts without regeneration. Generate once, then enable bypass mode to preserve prompts while changing inputs. Zero resource usage in bypass mode. - Fixed Seed Mode: Set seed = 1 to ignore image/video changes and maintain consistent prompts regardless of media variations. Perfect for stable workflow outputs.
- WAN 2.2 Integration: Specialized prompts for WAN 2.2 I2V (image-to-video) and T2V (text-to-video) generation with professional cinematography specifications and cinematic timeline structure. I2V preset prioritized for faster workflow access.
- Professional Cinematography: All WAN 2.2 presets include comprehensive technical specifications - light sources, shot types, lens specifications, camera movements, and color tone requirements for professional video generation.
- Extended Storyboard: New preset for seamless storyboard-to-storyboard generation with WAN 2.2 format compatibility, continuity focus, and professional cinematography details.
- WAN Family Branding: Consistent naming across all WAN 2.2 presets for better organization and workflow clarity.
- Free Abliterated Models: Default models include token-free uncensored options (Qwen3-4B-abliterated-TIES, Qwen3-8B-abliterated-TIES) for immediate accessibility.
- Multi-Model Support: Easily switch between various official Qwen-VL models with smart 4B-first ordering for VRAM efficiency.
- Automatic Model Download: Models are downloaded automatically on first use.
- Smart Quantization: Balance VRAM and performance with 4-bit, 8-bit, and FP16 options. 8-bit quantization enabled by default for optimal accessibility.
- Optimized Attention: Clean attention pipeline with Flash Attention 2 support and stable SDPA fallback. No complex patching that could interfere with model output.
- Hardware-Aware: Automatically detects GPU capabilities and prevents errors with incompatible models (e.g., FP8).
- Reproducible Generation: Use the seed parameter to get consistent outputs, with Fixed Seed Mode for ultimate stability.
- Memory Management: "Keep Model Loaded" option to retain the model in VRAM for faster processing.
- Image & Video Support: Accepts both single images and video frame sequences as input.
- Robust Error Handling: Provides clear error messages for hardware or memory issues.
- Clean Console Output: Minimal and informative console logs during operation.
๐ Installation
-
Clone this repository to your ComfyUI/custom_nodes directory:
cd ComfyUI/custom_nodes git clone https://github.com/huchukato/ComfyUI-QwenVL-Mod.git -
Install the required dependencies:
cd ComfyUI/custom_nodes/ComfyUI-QwenVL-Mod pip install -r requirements.txt -
Restart ComfyUI.
Optional: Flash Attention 2 Installation
For 2-3x performance boost with compatible GPUs:
# Install Flash Attention 2 (recommended)
pip install flash-attn --no-build-isolation
# Or compile from source
git clone https://github.com/Dao-AILab/flash-attention.git
cd flash-attention
python setup.py install
Requirements for Flash Attention 2:
- NVIDIA GPU with capability >= 8.6 (RTX 20/30/40/50 series)
- CUDA >= 12.0
- PyTorch >= 2.3.0
See Flash Attention 2 section for details.
๐งญ Node Overview
Transformers (HF) Nodes
- QwenVL: Quick vision-language inference (image/video + preset/custom prompts).
- QwenVL (Advanced): Full control over sampling, device, and performance settings.
- QwenVL Prompt Enhancer: Text-only prompt enhancement (supports both Qwen3 text models and QwenVL models in text mode).
GGUF (llama.cpp) Nodes
- QwenVL (GGUF): GGUF vision-language inference.
- QwenVL (GGUF Advanced): Extended GGUF controls (context, GPU layers, etc.).
- QwenVL Prompt Enhancer (GGUF): GGUF text-only prompt enhancement.
๐งฉ GGUF Nodes (llama.cpp backend)
This repo includes GGUF nodes powered by llama-cpp-python (separate from the Transformers-based nodes).
- Nodes:
QwenVL (GGUF),QwenVL (GGUF Advanced),QwenVL Prompt Enhancer (GGUF) - Model folder (default):
ComfyUI/models/llm/GGUF/(configurable viagguf_models.json) - Vision requirement: install a vision-capable
llama-cpp-pythonwheel that providesQwen3VLChatHandler/Qwen25VLChatHandler
See docs/LLAMA_CPP_PYTHON_VISION_INSTALL.md
๐๏ธ Config Files
- HF models:
hf_models.jsonhf_vl_models: vision-language models (used by QwenVL nodes).hf_text_models: text-only models (used by Prompt Enhancer).
- GGUF models:
gguf_models.json - System prompts:
AILab_System_Prompts.json(includes both VL prompts and prompt-enhancer styles).
๐ฅ Download Models
The models will be automatically downloaded on first use. If you prefer to download them manually, place them in the ComfyUI/models/LLM/Qwen-VL/ directory.
HF Vision Models (Qwen-VL)
| Model | Link | | :---- | :---- | | Qwen3-VL-2B-Instruct | Download | | Qwen3-VL-2B-Thinking | Download | | Qwen3-VL-2B-Instruct-FP8 | Download | | Qwen3-VL-2B-Thinking-FP8 | Download | | Qwen3-VL-4B-Instruct | Download | | Qwen3-VL-4B-Thinking | Download | | Qwen3-VL-4B-Instruct-FP8 | Download | | Qwen3-VL-4B-Thinking-FP8 | Download | | Qwen3-VL-8B-Instruct | Download | | Qwen3-VL-8B-Thinking | Download | | Qwen3-VL-8B-Instruct-FP8 | Download | | Qwen3-VL-8B-Thinking-FP8 | Download | | Qwen3-VL-32B-Instruct | Download | | Qwen3-VL-32B-Thinking | Download | | Qwen3-VL-32B-Instruct-FP8 | Download | | Qwen3-VL-32B-Thinking-FP8 | Download | | Qwen2.5-VL-3B-Instruct | Download | | Qwen2.5-VL-7B-Instruct | Download |
HF Text Models (Qwen3)
| Model | Link | | :---- | :---- | | Qwen3-0.6B | Download | | Qwen3-4B-Instruct-2507 | Download | | qwen3-4b-Z-Image-Engineer | Download |
GGUF Models (Manual Download)
| Group | Model | Repo | Alt Repo | Model Files | MMProj | | :-- | :-- | :-- | :-- | :-- | :-- | | Qwen text (GGUF) | Qwen3-4B-GGUF | Qwen/Qwen3-4B-GGUF | | Qwen3-4B-Q4_K_M.gguf, Qwen3-4B-Q5_0.gguf, Qwen3-4B-Q5_K_M.gguf, Qwen3-4B-Q6_K.gguf, Qwen3-4B-Q8_0.gguf | | | Qwen-VL (GGUF) | Qwen3-VL-4B-Instruct-GGUF | Qwen/Qwen3-VL-4B-Instruct-GGUF | | Qwen3VL-4B-Instruct-F16.gguf, Qwen3VL-4B-Instruct-Q4_K_M.gguf, Qwen3VL-4B-Instruct-Q8_0.gguf | mmproj-Qwen3VL-4B-Instruct-F16.gguf | | Qwen-VL (GGUF) | Qwen3-VL-8B-Instruct-GGUF | Qwen/Qwen3-VL-8B-Instruct-GGUF | | Qwen3VL-8B-Instruct-F16.gguf, Qwen3VL-8B-Instruct-Q4_K_M.gguf, Qwen3VL-8B-Instruct-Q8_0.gguf | mmproj-Qwen3VL-8B-Instruct-F16.gguf | | Qwen-VL (GGUF) | Qwen3-VL-4B-Thinking-GGUF | Qwen/Qwen3-VL-4B-Thinking-GGUF | | Qwen3VL-4B-Thinking-F16.gguf, Qwen3VL-4B-Thinking-Q4_K_M.gguf, Qwen3VL-4B-Thinking-Q8_0.gguf | mmproj-Qwen3VL-4B-Thinking-F16.gguf | | Qwen-VL (GGUF) | Qwen3-VL-8B-Thinking-GGUF | Qwen/Qwen3-VL-8B-Thinking-GGUF | | Qwen3VL-8B-Thinking-F16.gguf, Qwen3VL-8B-Thinking-Q4_K_M.gguf, Qwen3VL-8B-Thinking-Q8_0.gguf | mmproj-Qwen3VL-8B-Thinking-F16.gguf |
๐ Usage
Basic Usage
- Add the "QwenVL" node from the ๐งชAILab/QwenVL category.
- Select the model_name you wish to use.
- Connect an image or video (image sequence) source to the node.
- Write your prompt using the preset or custom field.
- Run the workflow.
Advanced Usage
For more control, use the "QwenVL (Advanced)" node. This gives you access to detailed generation parameters like temperature, top_p, beam search, and device selection.
โ๏ธ Parameters
| Parameter | Description | Default | Range | Node(s) | | :---- | :---- | :---- | :---- | :---- | | model_name | The Qwen-VL model to use. | Qwen3-VL-4B-Instruct | - | Standard & Advanced | | quantization | On-the-fly quantization. Ignored for pre-quantized models (e.g., FP8). | 8-bit (Balanced) | 4-bit, 8-bit, None | Standard & Advanced | | preset_prompt | A selection of pre-defined prompts for common tasks. | "Describe this..." | Any text | Standard & Advanced | | custom_prompt | Overrides the preset prompt if provided. | | Any text | Standard & Advanced | | max_tokens | Maximum number of new tokens to generate. | 1024 | 64-2048 | Standard & Advanced | | keep_model_loaded | Keep the model in VRAM for faster subsequent runs. | True | True/False | Standard & Advanced | | seed | A seed for reproducible results. | 1 | 1 - 2^64-1 | Standard & Advanced | | temperature | Controls randomness. Higher values = more creative. (Used when num_beams is 1). | 0.6 | 0.1-1.0 | Advanced Only | | top_p | Nucleus sampling threshold. (Used when num_beams is 1). | 0.9 | 0.0-1.0 | Advanced Only | | num_beams | Number of beams for beam search. > 1 disables temperature/top_p sampling. | 1 | 1-10 | Advanced Only | | repetition_penalty | Discourages repeating tokens. | 1.2 | 0.0-2.0 | Advanced Only | | frame_count | Number of frames to sample from the video input. | 16 | 1-64 | Advanced Only | | device | Override automatic device selection. | auto | auto, cuda, cpu | Advanced Only | | attention_mode | Attention backend for performance optimization. | auto | auto, flash_attention_2, sdpa | Standard & Advanced |
๐ก Quantization Options
| Mode | Precision | Memory Usage | Speed | Quality | Recommended For | | :---- | :---- | :---- | :---- | :---- | :---- | | None (FP16) | 16-bit Float | High | Fastest | Best | High VRAM GPUs (16GB+) | | 8-bit (Balanced) | 8-bit Integer | Medium | Fast | Very Good | Balanced performance (8GB+) | | 4-bit (VRAM-friendly) | 4-bit Integer | Low | Slower* | Good | Low VRAM GPUs (<8GB) |
* Note on 4-bit Speed: 4-bit quantization significantly reduces VRAM usage but may result in slower performance on some systems due to the computational overhead of real-time dequantization.
โก Attention Mode Options
| Mode | Description | Speed | Memory | Requirements | | :---- | :---- | :---- | :---- | :---- | | auto | Automatically selects Flash Attention 2 if available, falls back to SDPA | Fast | Medium | flash-attn package | | flash_attention_2 | Uses Flash Attention v2 for optimal performance | Fastest | Low | flash-attn + CUDA GPU | | sdpa | PyTorch native Scaled Dot Product Attention | Medium | Medium | PyTorch 2.0+ |
Flash Attention 2 Requirements:
- NVIDIA GPU with capability >= 8.6 (RTX 20/30/40/50 series)
- CUDA >= 12.0
- PyTorch >= 2.3.0
- flash-attn package installed
๐ค Setting Tips
| Setting | Recommendation | | :---- | :---- | | Model Choice | For most users, Qwen3-VL-4B-Instruct is a great starting point. If you have a 40-series GPU, try the -FP8 version for better performance. | | Memory Mode | Keep keep_model_loaded enabled (True) for the best performance if you plan to run the node multiple times. Disable it only if you are running out of VRAM for other nodes. | | Quantization | Start with the default 8-bit. If you have plenty of VRAM (>16GB), switch to None (FP16) for the best speed and quality. If you are low on VRAM, use 4-bit. | | Performance | The first time a model is loaded with a specific quantization, it may be slow. Subsequent runs (with keep_model_loaded enabled) will be much faster. | | Attention Mode | Use "flash_attention_2" for 2-3x speedup if you have compatible GPU. Otherwise use "auto" for automatic selection. |
๐ง About Model
This node utilizes the Qwen-VL series of models, developed by the Qwen Team at Alibaba Cloud. These are powerful, open-source large vision-language models (LVLMs) designed to understand and process both visual and textual information, making them ideal for tasks like detailed image and video description.
โก Flash Attention 2 Performance Boost
This integration includes support for Flash Attention 2, a cutting-edge attention implementation that provides significant performance improvements:
๐ Performance Gains
| Model | Flash Attention 2 | Speedup | |-------|----------------|---------| | Qwen2.5-VL-3B | 100% | 200-300% | 2-3x | | Qwen3-VL-4B | 100% | 150-250% | 1.5-2.5x |
๐ฏ How to Use
- Install Flash Attention 2 (see Installation)
- Select "flash_attention_2" in the
attention_modeparameter - Run your workflow - the system automatically applies the optimization
๐ง Technical Details
- Implementation: Uses optimized attention kernels for better memory efficiency
- Compatibility: Works with all quantization modes (4-bit, 8-bit, FP16)
- Integration: Seamlessly integrates with existing workflows
- Fallback: Automatically falls back to SDPA if Flash Attention 2 is not available
๐ Requirements Checklist
- [ ] flash-attn package installed
- [ ] Sufficient VRAM for your chosen model
- [ ] Compatible GPU (RTX 20 series or newer)
๐ Troubleshooting
Flash Attention 2 not working?
# Check installation
python -c "import flash_attn; print('Flash Attention 2 available')"
# Check GPU capability
python -c "import torch; print(f'GPU capability: {torch.cuda.get_device_capability()}')"
Common Problems:
- "Flash Attention 2 not available": Install the package and check GPU compatibility
- "CUDA not available": Ensure you have installed PyTorch compatible CUDA
- "GPU capability insufficient": Flash Attention 2 requires RTX 20 series or newer
๐ References
๐ฌ WAN 2.2 Integration
This enhanced version includes specialized prompts for WAN 2.2 video generation, supporting both I2V (image-to-video) and T2V (text-to-video) workflows.
๐ฏ Available WAN 2.2 Prompts
| Prompt Type | Use Case | Input | Output | Location | |:---|:---|:---|:---|:---| | ๐ฟ Wan 2.2 I2V | Image-to-Video | Image + Text | 5-second cinematic timeline | QwenVL nodes | | ๐ฟ Wan 2.2 T2V | Text-to-Video | Text only | 5-second cinematic timeline | Prompt Enhancer nodes |
โก Features
- Cinematic Timeline Structure: 5-second videos with second-by-second descriptions
- Multilingual Support: Italian/English input โ English optimized output
- Professional Scene Description: Film-style direction including lighting, camera, composition
- NSFW Handling: Appropriate content filtering and description
- WAN 2.2 Optimization: Specifically formatted for best video generation results
๐ Output Format Example
(At 0 seconds: A young woman stands facing a rack of clothes...)
(At 1 second: The blouse falls to the floor around her feet...)
(At 2 seconds: She reaches out with her right hand...)
(At 3 seconds: She turns her body slightly towards the mirror...)
(At 4 seconds: Lifting the hanger, she holds the dark fabric...)
(At 5 seconds: A subtle, thoughtful expression crosses her face...)
๐ง Usage
- For I2V: Use "๐ฟ Wan 2.2 I2V" preset in QwenVL nodes with image input
- For T2V: Use "๐ฟ Wan 2.2 T2V" style in Prompt Enhancer nodes with text only
- For Storyboard: Use "๐ฟ Wan Extended Storyboard" for seamless scene continuity
- For General Video: Use "๐ฅ Wan Cinematic Video" for professional single-scene descriptions
๐จ Best Practices
- Provide clear, descriptive input for better scene interpretation
- Use specific camera and lighting directions when possible
- Include mood and atmosphere details for cinematic results
- Leverage professional cinematography specs for optimal video quality
- The system automatically handles timeline optimization for WAN 2.2 presets
๐ฌ LTX 2.3 Integration
This version includes new specialized presets for LTX 2.3 video generation, supporting both I2V (image-to-video) and T2V (text-to-video) workflows with official prompting guides.
๐ฏ Available LTX 2.3 Prompts
| Prompt Type | Use Case | Input | Output | Location | |:---|:---|:---|:---|:---| | ๐ฅ LTX 2.3 NSFW I2V | Image-to-Video | Image + Text | Description of changes | QwenVL nodes | | ๐ฅ LTX 2.3 NSFW T2V | Text-to-Video | Text only | Complete scene description | Prompt Enhancer nodes |
โก Features
- Official Prompting Guide: Core Actions, Visual Details, Audio for optimized generation
- Multilingual Support: Input in any language โ English optimized output
- Simplified Format: No timeline, single fluid paragraph max 200 words
- Professional Scene Description: Film-style direction including lighting, camera, composition
- NSFW Handling: Full NSFW support for both presets
- LTX 2.3 Optimization: Specifically formatted for best video generation results
๐ Output Format Example
A woman in a red dress walks slowly through a sunlit garden, her hands gently brushing against blooming roses as golden afternoon light filters through the leaves, creating dappled patterns on her flowing fabric while the camera follows her graceful movement with a smooth tracking shot.
๐ง Usage
- For I2V: Use "๐ฅ LTX 2.3 NSFW I2V" preset in QwenVL nodes with image input
- For T2V: Use "๐ฅ LTX 2.3 NSFW T2V" style in Prompt Enhancer nodes with text only
- Prompting Guide: Follow Core Actions, Visual Details, Audio for optimal results
๐จ Best Practices
- Describe events and actions as they occur over time
- Include all visual details you want to appear in the video
- Describe sounds and dialogue needed for the scene
- Keep descriptions literal and precise
- Think like a film director describing a shot list
๐บ๏ธ Roadmap
โ Completed (v2.0.7)
- โ Support for Qwen3-VL and Qwen2.5-VL models.
- โ GGUF backend support for faster inference.
- โ Prompt Enhancer nodes for text-only workflows.
- โ Flash Attention 2 integration for 2-3x performance boost.
- โ WAN 2.2 I2V and T2V video generation prompts.
- โ Extended Storyboard preset for scene continuity.
- โ Professional cinematography specifications for all WAN 2.2 presets.
- โ WAN family branding and consistent naming.
- โ Extended Storyboard preset for seamless continuity generation.
- โ Free abliterated models without token requirements.
- โ Enhanced custom prompt logic across all nodes.
- โ Comprehensive NSFW content generation support.
- โ Optimized model ordering and quantization defaults.
- โ Clean attention pipeline with SDPA stability.
- โ Removed complexity for better model output reliability.
- โ Smart prompt caching system for performance optimization.
- โ Fixed Seed Mode for stable outputs regardless of media variations.
- โ Persistent cache across ComfyUI restarts.
- โ Code maintenance updates for future compatibility.
๐ Credits
- Qwen Team: Alibaba Cloud - For development and open-source powerful Qwen-VL models.
- ComfyUI: comfyanonymous - For incredible and extensible ComfyUI platform.
- llama-cpp-python: JamePeng/llama-cpp-python - GGUF backend with vision support used by GGUF nodes.
- GenorTG: GenorTG/ComfyUI-Genor-QwenVL-Mod - For innovative memory management improvements including
unload_after_runparameter and prompt cache optimizations that prevent OOM errors in multi-node workflows. - ComfyUI Integration: 1038lab - Developer of this custom node.
๐ฅ Author
- huchukato
- ๐ GitHub
- ๐ฆ X (Twitter)
- ๐จ Civitai - Check out my AI art models!
๐ License
This repository code is released under GPL-3.0 License.
Run ComfyUI workflows without the setup
No installs, no CUDA version roulette, no GPU sitting idle on your bill. Bring a workflow and run it in the browser.

