You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Lens doesn't work on Vulkan without Flash Attention #1572
I can’t reproduce this on my device using the Vulkan backend. You can try setting all ggml_ext_linear scales to 1/128.f to check whether the issue is related to the scale of the Linear layers. If that confirms the problem, then use bisection to identify which Linear layer is causing it.
It turns out --fa helps a lot: I get perfect images with the bf16 checkpoint on Vulkan too. For the q8_0 quant, I get garbage gens, but the w2 scaling gives a low quality result similar to the test above without --fa; so a more careful quant would probably be enough.
But without--fa, the suggested scale = 1 / 128.f change still gives bad results:
bf16
q8
ROCm
Vulkan
Vulkan, --fa, w2 scaling
Strangely, scaling everything to 1 / 128 is worse than scaling w2 only.
Can confirm that something is wrong with Vulkan when running Lens or Lens Turbo even with --diffusion-fa with BF16 weights. At least on my machine.
512x512 works with cfg 1.0 and 4 steps. If you slowly walk up the resolution, it looks coherent up until about 832x832 where it blows out. 512x1024 works, 1024x512 works. At 1024x1024 the image is mostly artifact, but occasionally you see portions of structure in there. None of my tweaking helped any.
Switched to the ROCm 7.1.1 build without changing anything else. 1024x1024, 1440x1440 and 2560x1440 all look perfect.
Activity
ZahyGabi commentedon May 29, 2026
I have the same problem with CPU-generation, and didn't help my naive modification of the above patch (s / Vulkan / CPU /
leejet commentedon May 31, 2026
I can’t reproduce this on my device using the Vulkan backend. You can try setting all
ggml_ext_linearscales to1/128.fto check whether the issue is related to the scale of the Linear layers. If that confirms the problem, then use bisection to identify which Linear layer is causing it.wbruna commentedon Jun 1, 2026
It turns out
--fahelps a lot: I get perfect images with thebf16checkpoint on Vulkan too. For theq8_0quant, I get garbage gens, but thew2scaling gives a low quality result similar to the test above without--fa; so a more careful quant would probably be enough.But without
--fa, the suggestedscale = 1 / 128.fchange still gives bad results:w2 scaling
Strangely, scaling everything to 1 / 128 is worse than scaling
w2only.[-][Bug] Lens doesn't work on Vulkan[/-][+][Bug] Lens doesn't work on Vulkan without Flash Attention[/+]wbruna commentedon Jun 2, 2026
Found tensor rules that make Vulkan work for me with or without flash attention:
\.transformer_blocks\..*\.((txt_mod\.1)|(img_mod\.1)|(txt_qkv)|(img_qkv)|(attn\.img_qkv)|(attn\.txt_qkv)|(w[13]))\.weight$=q8_0CMay commentedon Jun 10, 2026
Can confirm that something is wrong with Vulkan when running Lens or Lens Turbo even with --diffusion-fa with BF16 weights. At least on my machine.
512x512 works with cfg 1.0 and 4 steps. If you slowly walk up the resolution, it looks coherent up until about 832x832 where it blows out. 512x1024 works, 1024x512 works. At 1024x1024 the image is mostly artifact, but occasionally you see portions of structure in there. None of my tweaking helped any.
Switched to the ROCm 7.1.1 build without changing anything else. 1024x1024, 1440x1440 and 2560x1440 all look perfect.
Squashed 'ggml/' changes from e20c3a1..04b55bba