Skip to content

[Bug] sd-cli aborts with SIGABRT when generating video under the Auto/group memory policy on AMD (ggml_abort: alloc compute params backend buffer failed) #8322

Closed

Description

@SharkyRawr

Note: Please do not remove the questions. Answer beside them.

  1. Did you update? pip install --upgrade unsloth unsloth_zoo -- ✅ yes
  2. Colab or Kaggle or local / cloud -- local
  3. Number GPUs used, use nvidia-smi -- 1x AMD 7800 XT 16GB
  4. Which notebook? Please link! -- ❌ studio
  5. Which Unsloth version, TRL version, transformers version, PyTorch version? -- ⬇️ see below
  6. Which trainer? SFTTrainer, GRPOTrainer etc -- ❌ not training
 🦥 Unsloth Studio Setup
  ────────────────────────────────────────────────────
  node           v26.4.0 | npm 12.0.2 (system)
                 bun already installed (1.3.14)
                 building frontend...
                 using bun for package install (faster)
  frontend       built
  deps           [======--------------]  5/15  dependency overrides
                 torch 2.11.0+rocm7.2 detected -- installing torchao==0.17.0
  deps           [=========-----------]  7/15  flash-attn
  warning        No compatible flash-attn prebuilt wheel found
  deps           [====================] 15/15  torch final (rocm)
  deps           installed
  transformers   5.3.0 pre-installed
  transformers   5.5.0 pre-installed
  transformers   5.10.2 pre-installed
  gpu            AMD ROCm (gfx1101)
                 ROCm: /opt/rocm
                 hipconfig: 7.2.53211-3d9ef42
                 GPU: AMD Ryzen 9 5950X 16-Core Processor
                 installing prebuilt llama.cpp...
                 existing install detected -- validating update
  llama.cpp      prebuilt up to date and validated
                 installed release: unslothai/llama.cpp@b10333-mix-b1e9972 (tag b10333)
  whisper.cpp    prebuilt up to date

Video generation with MiniMax-H3 aborts (sd-cli exited -6) on an AMD ROCm system (gfx1101, 16 GB VRAM) whenever the memory policy is Auto / group. The crash happens at prompt-encoding, before any sampling.

What happens

The command unsloth runs includes --offload-to-cpu --diffusion-fa (group policy → OFFLOAD_GROUP → --offload-to-cpu + --diffusion-fa). sd-cli then dies with:

[ERROR] ggml_extend.hpp:72   - ggml_backend_cuda_buffer_type_alloc_buffer: allocating 17723.41 MiB on device 0: cudaMalloc failed: out of memory
[ERROR] ggml_extend.hpp:72   - alloc_tensor_range: failed to allocate ROCm0 buffer of size 18584340480
[ERROR] model_manager.cpp:472 - model manager alloc compute params backend buffer failed, num_tensors = 551
[ERROR] ggml_extend.hpp:1948 - qwen3vl prepare graph weights failed
[ERROR] conditioner.hpp:2058 - GGML_ASSERT(!hidden_states.empty()) failed   → SIGABRT (exit -6)

Root cause

--offload-to-cpu only moves parameters to RAM; it does not constrain the compute backend. The Qwen3-VL 32B Q4 text encoder is a single 17.7 GB block, and with graph-cut segmentation disabled by default, sd.cpp tries to stage the whole thing into VRAM on first graph use → cudaMalloc fails on the 16 GB card → ggml_abort.

The group policy is therefore unusable on any GPU smaller than the model's largest single buffer. "Off" (OFFLOAD_NONE) is the only working option on such cards today, which defeats the point of the memory picker.

Workaround (confirmed working)

Passing --max-vram -1 (auto-detect VRAM budget) enables graph-cut segmentation so only part of the encoder is resident at a time; the same command then completes successfully.

Expected behavior / request

Either:

  • have the group policy detect VRAM vs. model size and fall back to graph-cut segmentation, or
  • expose --max-vram (or a flag to enable graph-cut splitting) in the studio's memory settings so Auto can actually work on 16 GB cards.

Activity

  1. danielhanchen commented on Aug 18, 2026

    @danielhanchen
    Member

    This should be fixed now - sorry on the delay - please update Unsloth Studio to the latest via curl -fsSL https://unsloth.ai/install.sh | sh for Linux, Mac, WSL or irm https://unsloth.ai/install.ps1 | iex for Windows - if it's not fixed yet, it'll be in the next Studio release - if it's still not working after that, please open another issue - appreciate it again!

    Fixed in #8644 - video generation now passes --max-vram -1 --stream-layers on the Auto and group memory policies, so sd-cli no longer aborts allocating the compute params backend buffer.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions