Skip to content

[Bug] wan tae asking 17gb vram #1817

Description

@sca255

Git commit

5114672

Operating System & Version

manjaro, semi updated, not fully, abou t don alst 2 weeks ago

GGML backends

Vulkan

Command-line arguments used

sd-cli -M vid_gen --diffusion-model /home/arp/sd.cpp-webui/models/unet/Wan2_2-TI2V-5B-Turbo-Q4_K_M.gguf --t5xxl /home/arp/sd.cpp-webui/models/text_encoders/umt5-xxl-encoder-Q3_K_M.gguf --taesd /home/arp/sd.cpp-webui/models/taesd/taew2_2.pth -p "" -i /mnt/d/projects/sd.cpp-jsui/user_data/uploads/1784892381262_12_7.png -W 720 -H 480 --steps 1 --sampling-method er_sde --scheduler discrete --cfg-scale 1 -s -1 --cache-mode easycache --video-frames 96 --fps 24 --params-backend "diffusion=cpu,te=cpu,vae=cpu" --eager-load --fa -o /mnt/d/projects/sd.cpp-jsui/outputs/any2video/output_001.mp4 --vae-tiling --max-vram 7.5

Steps to reproduce

run the command

What you expected to happen

it to not oom

What actually happened

it oom'ed asking 17gb vram

Logs / error messages / stack trace

ggml_vulkan: Found 2 Vulkan devices:
ggml_vulkan: 0 = AMD Radeon RX 580 2048SP (RADV POLARIS10) (radv) | uma: 0 | fp16: 0 | bf16: 0 | warp size: 64 | shared memory: 65536 | int dot: 0 | matrix cores: none
ggml_vulkan: 1 = Intel(R) UHD Graphics 630 (CML GT2) (Intel open-source Mesa driver) | uma: 1 | fp16: 1 | bf16: 0 | warp size: 32 | shared memory: 49152 | int dot: 0 | matrix cores: none
[INFO ] media_io.cpp:575 - crop input image from 2304x1792 to 2304x1536, image_path = /mnt/d/projects/sd.cpp-jsui/user_data/uploads/1784892381262_12_7.png
[INFO ] media_io.cpp:592 - resize input image from 2304x1536 to 720x480
[INFO ] stable-diffusion.cpp:717 - loading diffusion model from '/home/arp/sd.cpp-webui/models/unet/Wan2_2-TI2V-5B-Turbo-Q4_K_M.gguf'
[INFO ] model_loader.cpp:236 - load /home/arp/sd.cpp-webui/models/unet/Wan2_2-TI2V-5B-Turbo-Q4_K_M.gguf using gguf format
[ERROR] ggml_extend.hpp:72 - gguf_init_from_reader: tensor 'patch_embedding.weight' has invalid number of dimensions: 5 > 4
[ERROR] ggml_extend.hpp:72 - gguf_init_from_reader: failed to read tensor info
[INFO ] stable-diffusion.cpp:764 - loading t5xxl from '/home/arp/sd.cpp-webui/models/text_encoders/umt5-xxl-encoder-Q3_K_M.gguf'
[INFO ] model_loader.cpp:236 - load /home/arp/sd.cpp-webui/models/text_encoders/umt5-xxl-encoder-Q3_K_M.gguf using gguf format
[INFO ] stable-diffusion.cpp:801 - loading tae from '/home/arp/sd.cpp-webui/models/taesd/taew2_2.pth'
[INFO ] model_loader.cpp:245 - load /home/arp/sd.cpp-webui/models/taesd/taew2_2.pth using torch zip format
[INFO ] stable-diffusion.cpp:854 - Version: Wan 2.2 TI2V
[INFO ] stable-diffusion.cpp:909 - Weight type stat: f32: 592 | f16: 134 | q3_K: 120 | q4_K: 255 | q5_K: 3 | q6_K: 91
[INFO ] stable-diffusion.cpp:910 - Conditioner weight type stat: f32: 73 | q3_K: 120 | q4_K: 45 | q5_K: 3 | q6_K: 1
[INFO ] stable-diffusion.cpp:911 - Diffusion model weight type stat: f32: 519 | f16: 6 | q4_K: 210 | q6_K: 90
[INFO ] stable-diffusion.cpp:912 - VAE weight type stat:
[INFO ] wan.hpp:870 - Wan2.2-TI2V-5B
[INFO ] stable-diffusion.cpp:1391 - using TAE for encoding / decoding
[INFO ] stable-diffusion.cpp:1505 - Using flash attention
[INFO ] stable-diffusion.cpp:1519 - Using flash attention in the diffusion model
|################################### | 825/1195 - 178.10MB/s
|############################################# | 1067/1195 - 175.18MB/s
|##################################################| 1195/1195 - 174.81MB/s
[INFO ] model_loader.cpp:1279 - loading tensors completed, taking 35.51s (read: 173.82s, memcpy: 0.00s, convert: 2.37s, copy_to_backend: 0.00s)
[INFO ] stable-diffusion.cpp:1625 - total params memory size = 9391.23MB (VRAM 0.00MB, RAM 9391.23MB): text_encoders 6091.95MB(RAM), diffusion_model 3277.49MB(RAM), vae 21.79MB(RAM), controlnet 0.00MB(N/A), extensions 0.00MB(N/A)
[INFO ] stable-diffusion.cpp:1741 - running in FLOW mode
[WARN ] stable-diffusion.cpp:3947 - align generation request up 720x480 to 736x480 (multiple=32)
[WARN ] stable-diffusion.cpp:3923 - align video frames from 156 to 153 for Wan 2.2 TI2V
[INFO ] denoiser.hpp:1026 - get_sigmas with discrete scheduler
[INFO ] stable-diffusion.cpp:4171 - sampling using ER-SDE method
[INFO ] stable-diffusion.cpp:5833 - IMG2VID
|==================================================| 2/2 - 15.15it/s
[INFO ] stable-diffusion.cpp:5861 - encode_first_stage completed, taking 154 ms
[INFO ] stable-diffusion.cpp:6005 - get_learned_condition completed, taking 24.54s
[INFO ] stable-diffusion.cpp:6367 - generate_video 736x480x153
[INFO ] sample-cache.cpp:63 - EasyCache enabled - threshold: 0.200, start: 0.15, end: 0.95
|==================================================| 1/1 - 130.25s/it
[INFO ] sample-cache.cpp:309 - EasyCache completed without skipping steps
[INFO ] stable-diffusion.cpp:6465 - sampling completed, taking 130.29s
[INFO ] stable-diffusion.cpp:6608 - generating latent video completed, taking 130.88s
ggml_vulkan: Device memory allocation of size 11041505280 failed.
ggml_vulkan: Requested buffer size exceeds device buffer size limit: ErrorOutOfDeviceMemory
[ERROR] ggml_extend.hpp:72 - ggml_gallocr_reserve_n_impl: failed to allocate Vulkan0 buffer of size 17872957448
[ERROR] ggml_extend.hpp:2166 - taehv: failed to allocate the compute buffer
[ERROR] ggml_extend.hpp:2732 - taehv alloc compute buffer failed
[ERROR] vae.hpp:48 - vae decode compute failed while processing a tile
[ERROR] vae.hpp:212 - vae decode compute failed
[INFO ] stable-diffusion.cpp:6036 - decode_first_stage completed, taking 0.48s
[ERROR] stable-diffusion.cpp:6038 - decode_first_stage failed for video
[ERROR] main.cpp:899 - generate failed

Additional context / environment details

rx 580 2048sp, 8gb vram

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions