Skip to content

Omni: Fix omni_xpu_kernel layer_norm (Input must be contiguous) error#495

Open
caijimin wants to merge 7 commits into
intel:mainfrom
caijimin:main
Open

Omni: Fix omni_xpu_kernel layer_norm (Input must be contiguous) error#495
caijimin wants to merge 7 commits into
intel:mainfrom
caijimin:main

Conversation

@caijimin

Copy link
Copy Markdown
Contributor

In ComfyUI-Florence2 and some other workflow like InfiniteTalk, encounter below error

  File "/llm/ComfyUI/comfy/ops.py", line 531, in forward_comfy_cast_weights
    x = _omni_norm.layer_norm(x_2d, weight, bias, self.eps).reshape(orig_shape)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/omni_xpu_kernel/norm/__init__.py", line 80, in layer_norm
    return _get_native().layer_norm(input, weight, bias, eps)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Input must be contiguous

Need change to

_get_native().layer_norm(input.contiguous(), weight, bias, eps

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