[XPU] Native Qwen3-VL FP8 decoding accelerated from 5.3 to 92 tokens/s on Intel Arc Pro B70

Open
#17,976 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
python, pytorch

Research direction

The payload names no ComfyUI files or tests. Its only code reference is the external repository github.com/kaiserwilli/ComfyUI-XPU-FP8-Decode, which holds the proposed kernels and numerical tests. Upstreaming needs maintainer scoping first, since it spans comfy-kitchen kernels and ComfyUI's native generation code. Done would mean an agreed integration plan and passing graph-versus-eager validation.

Written by the indexing model from the issue text.

Description

Feature
Feature Idea

Native FP8 decoding optimization for Intel XPU

I have developed and tested an implementation that substantially accelerates native Qwen3-VL-4B FP8 autoregressive decoding in ComfyUI on Intel XPU, without requiring a separate inference server or additional model checkpoint.

Source code: https://github.com/kaiserwilli/ComfyUI-XPU-FP8-Decode

Performance results

Testing was performed on an Intel Arc Pro B70.

  • Original native text generation (1024 tokens): 5.31 tokens/s overall.
  • Optimized text generation, greedy (1024 tokens): 92.10 tokens/s overall, 96.84 tokens/s steady-state.
  • Optimized multimodal generation, greedy (512 tokens): 83.67 tokens/s overall, 92.21 tokens/s steady-state.
  • Optimized multimodal generation, sampled (512 tokens): 59.87 tokens/s overall, 74.37 tokens/s steady-state.

This represents approximately a 17× improvement in warm text-generation throughput.

Native multimodal forward passes previously took approximately 0.18–0.23 seconds per token. The optimized implementation achieves approximately 92 tokens/s in steady-state greedy multimodal decoding.

In a full workflow involving text generation, diffusion, multimodal tile refinement, and image captioning, warm execution time decreased from approximately 102 seconds with text-only acceleration to 54 seconds with both text and multimodal acceleration. Generated token counts varied between runs.

Implementation

The primary optimizations include:

  • Direct FP8 GEMV, eliminating repeated materialization of dequantized projection weights.
  • Fused SYCL QKV projections.
  • Fused gate/up projections using a BF16 SiLU lookup table.
  • Specialized Triton projection kernels.
  • RoPE kernels that reproduce the optimized eager implementation's floating-point operation ordering.
  • Fixed-storage KV caches and XPU graph replay.
  • Graph-captured greedy argmax.
  • Separate native multimodal prefill and accelerated single-token decoding.

The implementation retains native vision encoding, DeepStack processing, diffusion conditioning, sampling, and EOS handling.

No separate GGUF model, external inference process, or additional resident language model is required.

Validation

The implementation has passed:

  • Standalone native kernel tests.
  • Source-only rebuilding and integration testing.
  • Graph-versus-optimized-eager numerical validation.
  • Greedy and sampled generation.
  • Full image-generation workflows.
  • Cancellation and subsequent generation recovery.
  • Model unloading and reloading.
  • ELF TEXTREL checks following corrected PIC device linking.

Graph replay matched the optimized eager reference exactly across 127 tested multimodal decode positions. Compared against the original native implementation using the same incoming token sequence, greedy argmax agreed at 125 of 127 positions.

Tested environment
  • GPU: Intel Arc Pro B70
  • OS: Linux
  • ComfyUI: 0.42.0
  • ComfyUI commit: 8f04fd6ecf4a548937971e840af2a985529fab76
  • PyTorch: 2.14.1+xpu
  • Python: 3.12.15
  • Triton: 3.8.0
  • comfy-kitchen: 0.2.39
  • Intel oneAPI compiler: 2026.2
  • Model: Qwen3-VL-4B, scalar-scaled E4M3FN FP8, with BF16 activations
Upstream integration

The current implementation is available as a custom extension targeting Qwen3-VL-4B on Intel XPU.

I would like to collaborate with the maintainers to integrate these optimizations into ComfyUI and its underlying libraries. In particular, the direct FP8 GEMV and fused projection kernels may be appropriate additions to comfy-kitchen, while XPU graph-based decoding could be incorporated into ComfyUI's native generation implementation.

The repository includes the complete implementation, native build instructions, numerical tests, benchmark workflow, and validation results under GPL-3.0.

I am interested in extending these optimizations to other model architectures and Intel GPUs and making these performance improvements available natively in ComfyUI.

Existing Solutions

No response

Other

No response

Dominant language
Python
Stars
150k
Forks
17.9k
Avg merge
1d 1h
Merged PRs (30d)
181

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/ComfyUI

All issues in Comfy-Org/ComfyUI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.