How kablex/comfyui-ref2va-vsa works
ComfyUI-Ref2VA-VSA is a ComfyUI custom node that accelerates MiniMax H3 reference-to-video generation with sparse visual attention. The user loads the example workflow, supplies a reference character and prompt, and queues generation. The workflow applies a four-step Turbo LoRA and the Ref2VA gate-transplant node; that node installs the VSA patch, which keeps reference, text, and audio tokens dense while sparsifying generated-video attention. The README documents an optional gate-extraction utility. Internal call details beyond the sampled excerpts are not inferred.
Main entry points: nodes.py VSA model patch · ref2va_vsa_4step_rtx4090.json RTX 4090 workflow · extract_vsa_gate.py Gate extractor
Components 15
Generation workflow
- RTX 4090 workflow
workflows/ref2va_vsa_4step_rtx4090.json - ComfyUI runtime
- Character reference
- MiniMax H3 model
- Turbo LoRA
- Generated video
VSA patching
- Ref2VA gate transplant
nodes.py - VSA model patch
nodes.py
Sparse attention
- Packed token geometry
nodes.py - Sparse attention
nodes.py - Sol-Attn CUDA
Gate preparation
- VSA gate weights
- FastH3 checkpoint
- Gate extractor
tools/extract_vsa_gate.py
Other components
- ComfyUI user
Connections 14
- ComfyUI user → RTX 4090 workflow: loads
README.md - RTX 4090 workflow → ComfyUI runtime: queues in
README.md - ComfyUI runtime → Character reference: conditions on
- ComfyUI runtime → MiniMax H3 model: runs model
- ComfyUI runtime → Turbo LoRA: loads LoRA
README.md - ComfyUI runtime → Ref2VA gate transplant: invokes node
README.md - VSA gate weights → Ref2VA gate transplant: loads weights
nodes.py - Ref2VA gate transplant → VSA model patch: delegates patch
nodes.py - VSA model patch → Packed token geometry: builds geometry
nodes.py - VSA model patch → Sparse attention: installs attention
nodes.py - Sparse attention → Sol-Attn CUDA: dispatches to
nodes.py - ComfyUI runtime → Generated video: generates
- FastH3 checkpoint → Gate extractor: provides tensors
tools/extract_vsa_gate.py - Gate extractor → VSA gate weights: saves weights
tools/extract_vsa_gate.py