Skip to content

Vulkan Memory Allocation Failure on Large Buffer Request (ErrorOutOfDeviceMemory) #734

@zhou7510

Description

@zhou7510

I'm encountering a Vulkan memory allocation error when attempting to run sd-v1-4.ckpt with -W 1024 -H 1024. Below is the error log:

ggml_vulkan: Found 1 Vulkan devices:
ggml_vulkan: 0 = Intel(R) Arc(TM) Graphics (Intel Corporation) | uma: 1 | fp16: 1 | warp size: 32 | shared memory: 32768 | int dot: 0 | matrix cores: KHR_coopmat
[INFO ] stable-diffusion.cpp:192  - loading model from 'D:\sd-master-1896b28-bin-win-vulkan-x64\models\sd-v1-4.ckpt'
[INFO ] model.cpp:1001 - load D:\sd-master-1896b28-bin-win-vulkan-x64\models\sd-v1-4.ckpt using checkpoint format
ZIP 0, name = archive/data.pkl, dir = archive/
[INFO ] stable-diffusion.cpp:243  - Version: SD 1.x
[INFO ] stable-diffusion.cpp:277  - Weight type:                 q4_0
[INFO ] stable-diffusion.cpp:278  - Conditioner weight type:     q4_0
[INFO ] stable-diffusion.cpp:279  - Diffusion model weight type: q4_0
[INFO ] stable-diffusion.cpp:280  - VAE weight type:             q4_0
  |==================================================| 1131/1131 - 0.00it/s
[INFO ] stable-diffusion.cpp:558  - total params memory size = 1562.22MB (VRAM 1562.22MB, RAM 0.00MB): clip 191.00MB(VRAM), unet 1276.75MB(VRAM), vae 94.47MB(VRAM), controlnet 0.00MB(VRAM), pmid 0.00MB(VRAM)
[INFO ] stable-diffusion.cpp:562  - loading model from 'D:\sd-master-1896b28-bin-win-vulkan-x64\models\sd-v1-4.ckpt' completed, taking 40.76s
[INFO ] stable-diffusion.cpp:604  - running in eps-prediction mode
[INFO ] stable-diffusion.cpp:2008 - TXT2IMG
[INFO ] stable-diffusion.cpp:738  - Attempting to apply 0 LoRAs
[INFO ] stable-diffusion.cpp:1562 - apply_loras completed, taking 0.00s
[INFO ] stable-diffusion.cpp:1696 - get_learned_condition completed, taking 497 ms
[INFO ] stable-diffusion.cpp:1719 - sampling using Euler A method
[INFO ] stable-diffusion.cpp:1768 - generating image: 1/1 - seed 42
ggml_vulkan: Device memory allocation of size 8767072832 failed.
ggml_vulkan: Requested buffer size exceeds device memory allocation limit: ErrorOutOfDeviceMemory
ggml_gallocr_reserve_n: failed to allocate Vulkan0 buffer of size 8767072832
[ERROR] ggml_extend.hpp:1138 - unet: failed to allocate the compute buffer`

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