Skip to content

[Bug] FLUX.3 Image Klein gives an all-white image on OpenCL (Adreno X1-85, Snapdragon X Elite); CPU and FLUX.2 klein on the same GPU are fine #2328

Open

Description

@GH-tjf

Git commit

9234ad8 (ggml submodule 135ce1e)

Operating System & Version

Windows 11 Home 10.0.26300 ARM64 — Surface Laptop, Snapdragon X Elite X1E80100, 16 GB RAM, Adreno X1-85 driver 31.0.137.0

GGML backends

OpenCL (built with -DSD_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON -DGGML_OPENCL_EMBED_KERNELS=ON, clang-cl ARM64), plus CPU

Command-line arguments used

sd-cli.exe --diffusion-model flux3-image-klein-Q4_0.gguf --vae flux2-vae.safetensors --llm Qwen3VL-4B-Instruct-Q8_0.gguf -p "a small white country church on a green hill, cartoon" -W 256 -H 256 --steps 2 --cfg-scale 1.0 --seed 7 -o out.png --backend te=cpu

Models: leejet/flux-3-image-klein-GGUF (Q8_0, Q4_K, Q4_0), Qwen/Qwen3-VL-4B-Instruct-GGUF Q8_0, FLUX.2 VAE (flux2-vae.safetensors from Comfy-Org Flux-2-Klein-4B).

Steps to reproduce

  1. Build with OpenCL for Adreno on Windows ARM64.
  2. Run the command above (diffusion model on the Adreno GPU, text encoder on CPU).

What you expected to happen

A normal picture, as the same command produces with --backend cpu.

What actually happened

The run exits 0 with no [E] lines, and the PNG is pure white (every pixel 255, std 0). It is the same in every combination I tried:

DiT quant size / steps backend result
Q8_0 1344x768 / 16 (sd-server, --max-vram 3.5) te=cpu, rest OpenCL all white
Q8_0 512x512 / 4 (sd-server, --max-vram 3.5) te=cpu, rest OpenCL all white
Q8_0 256x256 / 2, --max-vram 3.5 te=cpu, rest OpenCL all white
Q4_K 256x256 / 2 te=cpu, rest OpenCL all white
Q4_K 256x256 / 2 te=cpu, vae=cpu, DiT OpenCL all white
Q4_0 256x256 / 2 te=cpu, rest OpenCL all white
Q8_0 256x256 / 2 --backend cpu correct picture

On the same machine and build, FLUX.2 klein 4B (flux-2-klein-4b-Q8_0.gguf + Qwen3-4B Q8_0 + the same VAE) draws correctly on OpenCL, with and without --max-vram 2 (identical output). Since moving the VAE to CPU does not help, the DiT forward on OpenCL looks like the part that goes wrong.

Without --max-vram, the Q8_0 DiT (5.9 GB) fails to load: ggml_backend_opencl_buffer_type_alloc_buffer: failed to allocate 124.32 MiB (err=-5) after about 4.1 GB is placed. That is a separate limit, not the white-image bug (Q4_0/Q4_K fit and are still white).

Logs / error messages / stack trace

[I] Version: Flux.3 Image Klein
[I]     GPUOpenCL    Qualcomm(R) Adreno(TM) X1-85 GPU free   6963 MiB, budget   6451 MiB
[I]     DiT          params   3351 MiB, compute reserve  2048 MiB -> compute GPUOpenCL, params GPUOpenCL
[I]     Conditioner  params   4076 MiB, compute reserve  2048 MiB -> compute CPU, params cpu
[I]     VAE          params    320 MiB, compute reserve  1024 MiB -> compute GPUOpenCL, params GPUOpenCL
[I] auto-fit: --backend "te=cpu,diffusion=GPUOpenCL,vae=GPUOpenCL" --params-backend "te=cpu"
[I] Diffusion model weight type stat:     q4_0: 258  |    bf16: 101
[I] flash attention auto: OpenCL -> off (probe: normal 6.870 ms, flash 7.246 ms)
[I] conv2d direct auto: OpenCL -> off (no implicit GEMM path)
[I] running in Flux.3 FLOW mode
[I] sampling completed, taking 11.22s
[I] decode_first_stage completed, taking 6.02s

Additional context / environment details

One guess, not verified: the FLUX.3 DiT GGUFs keep 101 tensors in bf16, and I don't know whether the Adreno OpenCL path handles bf16 ops correctly. The FLUX.2 klein GGUF that works may not have them in bf16. Happy to run any test build or flag you suggest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions