Skip to content

[Bug] Vulkan/AMD RX 6950 XT: Flux (split text encoders) silently crashes since master-848-9cdb6b6 — regression vs master-841-6b3edaa (weight preparation OOM) #1946

Description

@laurentvv

Summary

Since release master-848-9cdb6b6, sd-cli (official bin-win-vulkan-x64 asset) crashes silently (process exits, no error message on stdout/stderr, bash reports exit code 127) when generating a Flux image with split text encoders on AMD Vulkan. The exact same command works on the previous release asset (master-841-6b3edaa). SDXL with a monolithic checkpoint works fine on the new build, so this looks related to the multi-model loading / weight-residency refactor (candidates: #1940, #1942, #1905).

Environment

  • OS: Windows 11 (10.0.26200)
  • GPU: AMD Radeon RX 6950 XT 16 GB (RDNA2 / gfx1030)
  • Driver: 32.0.21045.5002 (Adrenalin)
  • Build: sd-master-9cdb6b6-bin-win-vulkan-x64.zip (official release asset), commit 9cdb6b6
  • Working build for comparison: sd-master-<sha>-bin-win-vulkan-x64.zip with commit 6b3edaa (master-841)

Models (GGUF from the project's recommended sources):

  • flux1-schnell-Q6_K.gguf (diffusion model)
  • clip_l.safetensors, t5xxl_fp16.safetensors (text encoders)
  • ae.safetensors (VAE)

Reproduction

sd-cli.exe --diffusion-model flux1-schnell-Q6_K.gguf \
  --clip_l clip_l.safetensors --t5xxl t5xxl_fp16.safetensors --vae ae.safetensors \
  -p "a red apple on a wooden table, photo" \
  --steps 4 --cfg-scale 1.0 --sampling-method euler -W 512 -H 512 --seed 42 \
  --vae-tiling --backend vulkan -o out.png

Observed on 9cdb6b6 (master-848)

1) Default invocation — silent death. The process terminates without any error message (exit code 127 under Git Bash). Last log lines with -v:

[INFO   ] stable-diffusion.cpp:5322 - get_learned_condition completed, taking 13.73s
[INFO   ] stable-diffusion.cpp:5705 - generating image: 1/1 - seed 42
[INFO   ] ggml_graph_cut.cpp:965  - flux build cached graph cut plan done (taking 6 ms)
[VERBOSE] model_loader.cpp:1243 - loading tensors completed, taking 5.32s (read: 4.06s, ...)
[VERBOSE] model_manager.cpp:428  - model manager prepared params backend buffers (9379.29 MB, 776 tensors, 192 blocks, VRAM) on Vulkan0
<process exits here, no message>

2) --auto-fit off — identical silent crash at the same point.

3) --offload-to-cpu — hard Vulkan OOM error:

ggml_vulkan: vk::Device::createComputePipeline: ErrorOutOfDeviceMemory

4) --max-vram 6 — an actual error line is finally logged, then the process still dies silently:

[ERROR  ] ggml_runner.cpp:848  - t5 segment 17/26 (t5.block.15) failed during weight preparation
<process exits here, exit code 127, no additional message>

Expected / previous behavior

The identical command on the 6b3edaa build completes successfully and produces the image (this GPU is 16 GB; the previous build's streaming/offload behavior fits Flux Q6_K + t5xxl fp16 in VRAM).

Control test: SDXL is unaffected

A monolithic SDXL checkpoint (-m juggernautXL...safetensors, 512×512, euler_a) generates fine on 9cdb6b6 — so the regression is specific to the split-encoders path (diffusion model + separate clip/t5/vae), i.e. exactly what the new model manager / runner lifecycle code (#1940, #1942) and streamed-layer prefetch (#1905) touch.

Additional notes

  • Two distinct problems, possibly: (a) the weight-preparation memory management regression itself, and (b) the process exits with no diagnostic at all in cases 1/2/4 — even when an [ERROR] line was just logged (case 4), there is no exception message, no abort message, nothing. A graceful failure with the underlying Vulkan error would have made this much easier to report.
  • No other GPU-heavy process was running; no zombie sd-cli processes; VRAM was free before each run (each configuration was tested in a fresh process).
  • Happy to test a fix build or additional variants (e.g. quantized t5xxl, flux1-dev, other --max-vram values) on this machine.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions