krita-ai-diffusion icon indicating copy to clipboard operation
krita-ai-diffusion copied to clipboard

Qwen Edit Nunchaku fails with: view size is not compatible

Open StableLlama opened this issue 2 months ago • 3 comments

Using Qwen Edit 2509 Nunchaku and having in my image something selected and "Selection bounds" active I get this error message:

...
  File "/home/stablellama/devel/StableDiffusion/ComfyUI/venv/lib/python3.12/site-packages/nunchaku/models/linear.py", line 182, in forward
    x = x.view(batch_size * seq_len, channels)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

When I use "Entire Image" instead it is working. Or when I use "Selection bounds" and the non-Nunchaku version it's also working.

All of that is with batch size = 1 and strength = 100% and the 4-step lightning version.

StableLlama avatar Nov 09 '25 09:11 StableLlama

That's working for me generally. It might be related to specific canvas and selection size you are using.

If you provide the .kra with the selection active (in the state that produces the error) I can take a look. The workflow dump would also be helpful.

Acly avatar Nov 09 '25 23:11 Acly

@StableLlama you didn't mention which version of the plugin you're using.

fukc-gihtub avatar Nov 10 '25 16:11 fukc-gihtub

This is with 1.40.0

I'll update to 1.41.1 to see whether there's a difference or not

StableLlama avatar Nov 10 '25 17:11 StableLlama

That error hasn't come up for me since 1.41.1.

fukc-gihtub avatar Dec 01 '25 16:12 fukc-gihtub