Omni: replace ComfyUI core patch with ComfyUI-OmniXPU custom node#431
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convert the build-time
comfyui_for_multi_arc.patchinto 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 ofoptimized_attention,apply_rope1, andrms_normin 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.patchand copies the node into custom_nodes/ instead, with a tag-stamped git init so ComfyUI Manager can recognise the directory.