Extensions/ComfyUI-OmniXPU
ComfyUI Extension

ComfyUI-OmniXPU

Intel XPU acceleration for upstream ComfyUI via omni_xpu_kernel with transparent optimizations applied at startup.

By Jasonzzt·Created 4 months ago·Updated 4 months ago· 4
Jasonzzt/ComfyUI-OmniXPU
Nodes
On cloudLocal install
Stars4
Updated4 months ago
Readme

ComfyUI-OmniXPU

Intel XPU acceleration for upstream ComfyUI via omni_xpu_kernel.

All optimizations are applied transparently at startup — no workflow changes needed.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/analytics-zoo/ComfyUI-OmniXPU.git

Requires omni_xpu_kernel installed. Without it the node loads silently with no patches applied.

What it does

| Patch | Target | |-------|--------| | ESIMD Flash Attention | optimized_attention | | ESIMD RoPE | _apply_rope1 / apply_rope1 | | ESIMD LayerNorm/RMSNorm | LayerNorm.forward / RMSNorm.forward / rms_norm() | | FP8 GEMM | fp8_linear / mixed_precision_ops | | FP8 Negative Zero Fix | manual_stochastic_round_to_float8 | | Interpolate Fix | F.interpolate |

Environment Variables

All patches enabled by default. Disable with =0:

OMNIXPU_ENABLE=0            # Master switch — disable everything
OMNIXPU_ATTENTION=0         # Disable ESIMD Flash Attention only
OMNIXPU_ROPE=0              # Disable ESIMD RoPE only
OMNIXPU_NORM=0              # Disable ESIMD LayerNorm/RMSNorm only
OMNIXPU_FP8_GEMM=0          # Disable FP8 GEMM only
OMNIXPU_FP8_NEG_ZERO_FIX=0  # Disable FP8 negative zero fix only
OMNIXPU_INTERPOLATE_FIX=0   # Disable interpolate workaround only

Diagnostics

Add the OmniXPU Status node to any workflow to see:

=== ComfyUI-OmniXPU Status ===
  GPU: Intel(R) Arc(TM) B580 Graphics (11605 MB)
  omni_xpu_kernel: 0.1.0
    available: sdp, norm, rotary, linear_fp8

  [+] interpolate_fix: applied
  [+] fp8_neg_zero_fix: applied
  [+] norm: applied
  [+] rope: applied
  [+] fp8_gemm: applied
  [+] attention: applied

Startup Log

When loaded successfully, ComfyUI logs:

[OmniXPU] omni_xpu_kernel 0.1.0 — available: sdp, norm, rotary, linear_fp8
[OmniXPU] interpolate_fix: applied
[OmniXPU] fp8_neg_zero_fix: applied
[OmniXPU] norm: applied
[OmniXPU] rope: applied
[OmniXPU] fp8_gemm: applied
[OmniXPU] attention: applied

How it works

The node monkey-patches ComfyUI internals at import time. Each patch:

  1. Checks if the corresponding omni_xpu_kernel submodule is available (via centralized probe)
  2. Verifies the target function/class exists in the current ComfyUI version
  3. Wraps the original with an XPU-accelerated version that falls back to the original for non-XPU tensors or unsupported shapes
  4. Records status for the diagnostics node

No ComfyUI core files are modified. Works with unmodified upstream ComfyUI.

Compatibility

  • ComfyUI >= 0.18.x
  • PyTorch >= 2.7 with XPU support
  • omni_xpu_kernel >= 0.1.0