Skip to content

Omni: replace ComfyUI core patch with ComfyUI-OmniXPU custom node#431

Merged
xiangyuT merged 2 commits into
intel:mainfrom
xiangyuT:dev/comfyui-omnixpu-customnode
Jun 4, 2026
Merged

Omni: replace ComfyUI core patch with ComfyUI-OmniXPU custom node#431
xiangyuT merged 2 commits into
intel:mainfrom
xiangyuT:dev/comfyui-omnixpu-customnode

Conversation

@xiangyuT

Copy link
Copy Markdown
Contributor

Convert the build-time comfyui_for_multi_arc.patch into a custom node so upstream ComfyUI is not modified. Same kernel coverage (LayerNorm/RMSNorm, RoPE, Flash Attention, FP8 W8A16 GEMM, FP8 negative-zero fix) plus runtime sys.modules walk that rebinds by-value imports of optimized_attention, apply_rope1, and rms_norm in already-loaded diffusion model files — without it, those bindings stay frozen to the unpatched callables since ComfyUI imports model_base before custom_node init.

Env knobs (default values mirror b7 behavior):
OMNIXPU_ENABLE / _ATTENTION / _ROPE / _NORM / _FP8_GEMM /
_FP8_NEG_ZERO_FIX / _INTERPOLATE_FIX

Dockerfile drops git apply comfyui_for_multi_arc.patch and copies the node into custom_nodes/ instead, with a tag-stamped git init so ComfyUI Manager can recognise the directory.

xiangyuT and others added 2 commits May 27, 2026 00:59
Convert the build-time `comfyui_for_multi_arc.patch` into a custom node so
upstream ComfyUI is not modified. Same kernel coverage (LayerNorm/RMSNorm,
RoPE, Flash Attention, FP8 W8A16 GEMM, FP8 negative-zero fix) plus runtime
sys.modules walk that rebinds by-value imports of `optimized_attention`,
`apply_rope1`, and `rms_norm` in already-loaded diffusion model files —
without it, those bindings stay frozen to the unpatched callables since
ComfyUI imports model_base before custom_node init.

Verified on B60 with ComfyUI 0.20.1 and 0.22.0.

Env knobs (default values mirror the previous build-time patch behavior):
  OMNIXPU_ENABLE / _ATTENTION / _ROPE / _NORM / _FP8_GEMM /
  _FP8_NEG_ZERO_FIX / _INTERPOLATE_FIX

Dockerfile drops `git apply comfyui_for_multi_arc.patch` and copies the
node into custom_nodes/ instead, with a tag-stamped git init so ComfyUI
Manager can recognise the directory.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors PR intel#427 (intel/llm-scaler) for the custom-node version. Without
this, omni_xpu_kernel norm kernels are invoked on non-contiguous input
(seen in ComfyUI-Florence2 / DaViT layer norms) and silently produce
wrong values.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@xiangyuT xiangyuT marked this pull request as ready for review June 4, 2026 02:44
@xiangyuT xiangyuT merged commit 51b75aa into intel:main Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant