Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

benchmark: Apple M1, macOS Big Sur #31

leejet started this conversation in Benchmark
Discussion options

  • OS: macOS Big Sur
  • CPU: Apple M1
  • RAM: 16GB

Original

  • commit: 0d7f04b
  • OPENBLAS: OFF
  • CUBLAS: OFF
git checkout 0d7f04b135cd48e8d62aecd09a52eb2afa482744
git submodule update
  • command
./bin/sd -m ../models/sd-v1-4-ggml-model-f16.bin -p "a lovely cat" -v
  • result
[INFO] stable-diffusion.cpp:3260 - step 1 sampling completed, taking 13.14s
[INFO] stable-diffusion.cpp:3573 - sampling completed, taking 278.37s
[INFO] stable-diffusion.cpp:3586 - decode_first_stage completed, taking 54.58s
[INFO] stable-diffusion.cpp:3600 - txt2img completed in 333.25s, use 2358.73MB of memory: peak params memory 1969.97MB, peak runtime memory 2177.12MB
Option:
 n_threads: 8
 mode: txt2img
 model_path: ../models/sd-v1-4-ggml-model-f16.bin
 output_path: output.png
 init_img:
 prompt: a lovely cat
 negative_prompt:
 cfg_scale: 7.00
 width: 512
 height: 512
 sample_method: eular a
 sample_steps: 20
 strength: 0.75
 seed: 42
System Info:
 BLAS = 1
 SSE3 = 0
 AVX = 0
 AVX2 = 0
 AVX512 = 0
 AVX512_VBMI = 0
 AVX512_VNNI = 0
 FMA = 0
 NEON = 1
 ARM_FMA = 1
 F16C = 0
 FP16_VA = 1
 WASM_SIMD = 0
 VSX = 0
[INFO] stable-diffusion.cpp:2687 - loading model from '../models/sd-v1-4-ggml-model-f16.bin'
[DEBUG] stable-diffusion.cpp:2695 - verifying magic
[DEBUG] stable-diffusion.cpp:2706 - loading hparams
[INFO] stable-diffusion.cpp:2712 - ftype: f16
[DEBUG] stable-diffusion.cpp:2718 - loading vocab
[DEBUG] stable-diffusion.cpp:2746 - ggml tensor size = 272 bytes
[DEBUG] stable-diffusion.cpp:2751 - clip params ctx size = 236.23 MB
[DEBUG] stable-diffusion.cpp:2770 - unet params ctx size = 1641.36 MB
[DEBUG] stable-diffusion.cpp:2791 - vae params ctx size = 95.51 MB
[DEBUG] stable-diffusion.cpp:2812 - preparing memory for the weights
[DEBUG] stable-diffusion.cpp:2828 - loading weights
[DEBUG] stable-diffusion.cpp:2932 - model size = 1969.67MB
[INFO] stable-diffusion.cpp:2941 - total params size = 1969.97MB (clip 235.01MB, unet 1640.45MB, vae 94.51MB)
[INFO] stable-diffusion.cpp:2943 - loading model from '../models/sd-v1-4-ggml-model-f16.bin' completed, taking 0.77s
[DEBUG] stable-diffusion.cpp:766 - parse 'a lovely cat' to [['a lovely cat', 1], ]
[DEBUG] stable-diffusion.cpp:353 - split prompt "a lovely cat" to tokens ["a</w>", "lovely</w>", "cat</w>", ]
[DEBUG] stable-diffusion.cpp:2982 - condition context need 10.19MB static memory, with work_size needing 9.00MB
[DEBUG] stable-diffusion.cpp:3006 - building condition graph completed: 633 nodes, 210 leafs
[DEBUG] stable-diffusion.cpp:3013 - computing condition graph completed, taking 0.16s
[INFO] stable-diffusion.cpp:3066 - condition graph use 248.13MB of memory: params 235.01MB, runtime 13.12MB (static 10.19MB, dynamic 2.93MB)
[DEBUG] stable-diffusion.cpp:3068 - 236544 bytes of dynamic memory has not been released yet
[DEBUG] stable-diffusion.cpp:766 - parse '' to [['', 1], ]
[DEBUG] stable-diffusion.cpp:353 - split prompt "" to tokens []
[DEBUG] stable-diffusion.cpp:2982 - condition context need 10.19MB static memory, with work_size needing 9.00MB
[DEBUG] stable-diffusion.cpp:3006 - building condition graph completed: 633 nodes, 210 leafs
[DEBUG] stable-diffusion.cpp:3013 - computing condition graph completed, taking 0.14s
[INFO] stable-diffusion.cpp:3066 - condition graph use 248.13MB of memory: params 235.01MB, runtime 13.12MB (static 10.19MB, dynamic 2.93MB)
[DEBUG] stable-diffusion.cpp:3068 - 236544 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3552 - get_learned_condition completed, taking 0.31s
[INFO] stable-diffusion.cpp:3568 - start sampling
[DEBUG] stable-diffusion.cpp:3119 - diffusion context need 69.56MB static memory, with work_size needing 67.50MB
[INFO] stable-diffusion.cpp:3260 - step 1 sampling completed, taking 13.14s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 2 sampling completed, taking 12.97s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 3 sampling completed, taking 13.04s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 4 sampling completed, taking 13.36s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 5 sampling completed, taking 13.30s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 6 sampling completed, taking 13.52s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 7 sampling completed, taking 13.80s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 8 sampling completed, taking 13.86s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 9 sampling completed, taking 13.90s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 10 sampling completed, taking 14.10s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 11 sampling completed, taking 14.13s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 12 sampling completed, taking 14.10s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 13 sampling completed, taking 14.27s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 14 sampling completed, taking 14.35s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 15 sampling completed, taking 14.28s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 16 sampling completed, taking 14.37s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 17 sampling completed, taking 14.38s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 18 sampling completed, taking 14.58s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 19 sampling completed, taking 14.49s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 20 sampling completed, taking 14.42s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3287 - diffusion graph use 2264.22MB of memory: params 1640.45MB, runtime 623.77MB (static 69.56MB, dynamic 554.21MB)
[DEBUG] stable-diffusion.cpp:3288 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3573 - sampling completed, taking 278.37s
[DEBUG] stable-diffusion.cpp:3449 - vae context need 1153.12MB static memory, with work_size needing 1152.00MB
[DEBUG] stable-diffusion.cpp:3473 - computing vae graph completed, taking 54.55s
[INFO] stable-diffusion.cpp:3496 - vae graph use 2271.63MB of memory: params 94.51MB, runtime 2177.12MB (static 1153.12MB, dynamic 1024.00MB)
[DEBUG] stable-diffusion.cpp:3497 - 3145728 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3586 - decode_first_stage completed, taking 54.58s
[INFO] stable-diffusion.cpp:3600 - txt2img completed in 333.25s, use 2358.73MB of memory: peak params memory 1969.97MB, peak runtime memory 2177.12MB
save result image to 'output.png'

Improvement 1

  • commit: 467bc5b
  • OPENBLAS: OFF
  • CUBLAS: OFF
git checkout 467bc5baeb7fe3bcb07827582ae64e9136ab4519
git submodule update
  • command
./bin/sd -m ../models/sd-v1-4-ggml-model-f16.bin -p "a lovely cat" -v
  • result
[INFO] stable-diffusion.cpp:3260 - step 1 sampling completed, taking 11.67s
[INFO] stable-diffusion.cpp:3573 - sampling completed, taking 251.44s
[INFO] stable-diffusion.cpp:3586 - decode_first_stage completed, taking 31.84s
[INFO] stable-diffusion.cpp:3600 - txt2img completed in 283.59s, use 2358.73MB of memory: peak params memory 1969.97MB, peak runtime memory 2177.12MB
bin -p "a lovely cat" -v
Option:
 n_threads: 8
 mode: txt2img
 model_path: ../models/sd-v1-4-ggml-model-f16.bin
 output_path: output.png
 init_img:
 prompt: a lovely cat
 negative_prompt:
 cfg_scale: 7.00
 width: 512
 height: 512
 sample_method: eular a
 sample_steps: 20
 strength: 0.75
 seed: 42
System Info:
 BLAS = 1
 SSE3 = 0
 AVX = 0
 AVX2 = 0
 AVX512 = 0
 AVX512_VBMI = 0
 AVX512_VNNI = 0
 FMA = 0
 NEON = 1
 ARM_FMA = 1
 F16C = 0
 FP16_VA = 1
 WASM_SIMD = 0
 VSX = 0
[INFO] stable-diffusion.cpp:2687 - loading model from '../models/sd-v1-4-ggml-model-f16.bin'
[DEBUG] stable-diffusion.cpp:2695 - verifying magic
[DEBUG] stable-diffusion.cpp:2706 - loading hparams
[INFO] stable-diffusion.cpp:2712 - ftype: f16
[DEBUG] stable-diffusion.cpp:2718 - loading vocab
[DEBUG] stable-diffusion.cpp:2746 - ggml tensor size = 272 bytes
[DEBUG] stable-diffusion.cpp:2751 - clip params ctx size = 236.23 MB
[DEBUG] stable-diffusion.cpp:2770 - unet params ctx size = 1641.36 MB
[DEBUG] stable-diffusion.cpp:2791 - vae params ctx size = 95.51 MB
[DEBUG] stable-diffusion.cpp:2812 - preparing memory for the weights
[DEBUG] stable-diffusion.cpp:2828 - loading weights
[DEBUG] stable-diffusion.cpp:2932 - model size = 1969.67MB
[INFO] stable-diffusion.cpp:2941 - total params size = 1969.97MB (clip 235.01MB, unet 1640.45MB, vae 94.51MB)
[INFO] stable-diffusion.cpp:2943 - loading model from '../models/sd-v1-4-ggml-model-f16.bin' completed, taking 0.65s
[DEBUG] stable-diffusion.cpp:766 - parse 'a lovely cat' to [['a lovely cat', 1], ]
[DEBUG] stable-diffusion.cpp:353 - split prompt "a lovely cat" to tokens ["a</w>", "lovely</w>", "cat</w>", ]
[DEBUG] stable-diffusion.cpp:2982 - condition context need 10.19MB static memory, with work_size needing 9.00MB
[DEBUG] stable-diffusion.cpp:3006 - building condition graph completed: 633 nodes, 210 leafs
[DEBUG] stable-diffusion.cpp:3013 - computing condition graph completed, taking 0.16s
[INFO] stable-diffusion.cpp:3066 - condition graph use 248.13MB of memory: params 235.01MB, runtime 13.12MB (static 10.19MB, dynamic 2.93MB)
[DEBUG] stable-diffusion.cpp:3068 - 236544 bytes of dynamic memory has not been released yet
[DEBUG] stable-diffusion.cpp:766 - parse '' to [['', 1], ]
[DEBUG] stable-diffusion.cpp:353 - split prompt "" to tokens []
[DEBUG] stable-diffusion.cpp:2982 - condition context need 10.19MB static memory, with work_size needing 9.00MB
[DEBUG] stable-diffusion.cpp:3006 - building condition graph completed: 633 nodes, 210 leafs
[DEBUG] stable-diffusion.cpp:3013 - computing condition graph completed, taking 0.15s
[INFO] stable-diffusion.cpp:3066 - condition graph use 248.13MB of memory: params 235.01MB, runtime 13.12MB (static 10.19MB, dynamic 2.93MB)
[DEBUG] stable-diffusion.cpp:3068 - 236544 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3552 - get_learned_condition completed, taking 0.31s
[INFO] stable-diffusion.cpp:3568 - start sampling
[DEBUG] stable-diffusion.cpp:3119 - diffusion context need 69.56MB static memory, with work_size needing 67.50MB
[INFO] stable-diffusion.cpp:3260 - step 1 sampling completed, taking 11.67s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 2 sampling completed, taking 11.76s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 3 sampling completed, taking 11.72s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 4 sampling completed, taking 11.96s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 5 sampling completed, taking 12.19s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 6 sampling completed, taking 12.30s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 7 sampling completed, taking 12.40s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 8 sampling completed, taking 12.51s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 9 sampling completed, taking 12.71s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 10 sampling completed, taking 12.88s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 11 sampling completed, taking 12.77s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 12 sampling completed, taking 12.83s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 13 sampling completed, taking 12.83s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 14 sampling completed, taking 12.90s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 15 sampling completed, taking 12.96s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 16 sampling completed, taking 12.89s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 17 sampling completed, taking 13.05s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 18 sampling completed, taking 13.01s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 19 sampling completed, taking 12.98s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3260 - step 20 sampling completed, taking 13.09s
[DEBUG] stable-diffusion.cpp:3264 - diffusion graph use 623.77MB runtime memory: static 69.56MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3265 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3287 - diffusion graph use 2264.22MB of memory: params 1640.45MB, runtime 623.77MB (static 69.56MB, dynamic 554.21MB)
[DEBUG] stable-diffusion.cpp:3288 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3573 - sampling completed, taking 251.44s
[DEBUG] stable-diffusion.cpp:3449 - vae context need 1153.12MB static memory, with work_size needing 1152.00MB
[DEBUG] stable-diffusion.cpp:3473 - computing vae graph completed, taking 31.81s
[INFO] stable-diffusion.cpp:3496 - vae graph use 2271.63MB of memory: params 94.51MB, runtime 2177.12MB (static 1153.12MB, dynamic 1024.00MB)
[DEBUG] stable-diffusion.cpp:3497 - 3145728 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3586 - decode_first_stage completed, taking 31.84s
[INFO] stable-diffusion.cpp:3600 - txt2img completed in 283.59s, use 2358.73MB of memory: peak params memory 1969.97MB, peak runtime memory 2177.12MB
save result image to 'output.png'

Improvement 2

  • commit: d765b95
  • OPENBLAS: OFF
  • CUBLAS: OFF
git checkout d765b95ed10e47469fb3b0a4a76831c38e301828
git submodule update
  • command
./bin/sd -m ../models/sd-v1-4-ggml-model-f16.bin -p "a lovely cat" -v
  • result
[INFO] stable-diffusion.cpp:3264 - step 1 sampling completed, taking 10.71s
[INFO] stable-diffusion.cpp:3585 - sampling completed, taking 231.60s
[INFO] stable-diffusion.cpp:3598 - decode_first_stage completed, taking 20.09s
[INFO] stable-diffusion.cpp:3612 - txt2img completed in 251.95s, use 2316.26MB of memory: peak params memory 1969.97MB, peak runtime memory 1665.14MB
Option:
 n_threads: 8
 mode: txt2img
 model_path: ../models/sd-v1-4-ggml-model-f16.bin
 output_path: output.png
 init_img:
 prompt: a lovely cat
 negative_prompt:
 cfg_scale: 7.00
 width: 512
 height: 512
 sample_method: eular a
 sample_steps: 20
 strength: 0.75
 seed: 42
System Info:
 BLAS = 1
 SSE3 = 0
 AVX = 0
 AVX2 = 0
 AVX512 = 0
 AVX512_VBMI = 0
 AVX512_VNNI = 0
 FMA = 0
 NEON = 1
 ARM_FMA = 1
 F16C = 0
 FP16_VA = 1
 WASM_SIMD = 0
 VSX = 0
[INFO] stable-diffusion.cpp:2687 - loading model from '../models/sd-v1-4-ggml-model-f16.bin'
[DEBUG] stable-diffusion.cpp:2695 - verifying magic
[DEBUG] stable-diffusion.cpp:2706 - loading hparams
[INFO] stable-diffusion.cpp:2712 - ftype: f16
[DEBUG] stable-diffusion.cpp:2718 - loading vocab
[DEBUG] stable-diffusion.cpp:2746 - ggml tensor size = 272 bytes
[DEBUG] stable-diffusion.cpp:2751 - clip params ctx size = 236.23 MB
[DEBUG] stable-diffusion.cpp:2770 - unet params ctx size = 1641.36 MB
[DEBUG] stable-diffusion.cpp:2791 - vae params ctx size = 95.51 MB
[DEBUG] stable-diffusion.cpp:2812 - preparing memory for the weights
[DEBUG] stable-diffusion.cpp:2828 - loading weights
[DEBUG] stable-diffusion.cpp:2932 - model size = 1969.67MB
[INFO] stable-diffusion.cpp:2941 - total params size = 1969.97MB (clip 235.01MB, unet 1640.45MB, vae 94.51MB)
[INFO] stable-diffusion.cpp:2943 - loading model from '../models/sd-v1-4-ggml-model-f16.bin' completed, taking 0.64s
[DEBUG] stable-diffusion.cpp:766 - parse 'a lovely cat' to [['a lovely cat', 1], ]
[DEBUG] stable-diffusion.cpp:353 - split prompt "a lovely cat" to tokens ["a</w>", "lovely</w>", "cat</w>", ]
[DEBUG] stable-diffusion.cpp:2982 - condition context need 10.19MB static memory, with work_size needing 9.00MB
[DEBUG] stable-diffusion.cpp:3006 - building condition graph completed: 633 nodes, 210 leafs
[DEBUG] stable-diffusion.cpp:3013 - computing condition graph completed, taking 0.14s
[INFO] stable-diffusion.cpp:3066 - condition graph use 248.13MB of memory: params 235.01MB, runtime 13.12MB (static 10.19MB, dynamic 2.93MB)
[DEBUG] stable-diffusion.cpp:3068 - 236544 bytes of dynamic memory has not been released yet
[DEBUG] stable-diffusion.cpp:766 - parse '' to [['', 1], ]
[DEBUG] stable-diffusion.cpp:353 - split prompt "" to tokens []
[DEBUG] stable-diffusion.cpp:2982 - condition context need 10.19MB static memory, with work_size needing 9.00MB
[DEBUG] stable-diffusion.cpp:3006 - building condition graph completed: 633 nodes, 210 leafs
[DEBUG] stable-diffusion.cpp:3013 - computing condition graph completed, taking 0.13s
[INFO] stable-diffusion.cpp:3066 - condition graph use 248.13MB of memory: params 235.01MB, runtime 13.12MB (static 10.19MB, dynamic 2.93MB)
[DEBUG] stable-diffusion.cpp:3068 - 236544 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3564 - get_learned_condition completed, taking 0.26s
[INFO] stable-diffusion.cpp:3580 - start sampling
[DEBUG] stable-diffusion.cpp:3119 - diffusion context need 27.09MB static memory, with work_size needing 25.00MB
[INFO] stable-diffusion.cpp:3264 - step 1 sampling completed, taking 10.71s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 2 sampling completed, taking 10.78s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 3 sampling completed, taking 11.06s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 4 sampling completed, taking 11.17s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 5 sampling completed, taking 11.33s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 6 sampling completed, taking 11.45s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 7 sampling completed, taking 11.51s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 8 sampling completed, taking 11.61s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 9 sampling completed, taking 11.70s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 10 sampling completed, taking 11.68s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 11 sampling completed, taking 11.84s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 12 sampling completed, taking 11.87s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 13 sampling completed, taking 11.78s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 14 sampling completed, taking 11.85s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 15 sampling completed, taking 11.77s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 16 sampling completed, taking 11.85s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 17 sampling completed, taking 11.82s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 18 sampling completed, taking 11.95s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 19 sampling completed, taking 11.91s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3264 - step 20 sampling completed, taking 11.94s
[DEBUG] stable-diffusion.cpp:3268 - diffusion graph use 581.30MB runtime memory: static 27.09MB, dynamic 554.21MB
[DEBUG] stable-diffusion.cpp:3269 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3291 - diffusion graph use 2221.75MB of memory: params 1640.45MB, runtime 581.30MB (static 27.09MB, dynamic 554.21MB)
[DEBUG] stable-diffusion.cpp:3292 - 65536 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3585 - sampling completed, taking 231.60s
[DEBUG] stable-diffusion.cpp:3457 - vae context need 1.14MB static memory, with work_size needing 0.00MB
[DEBUG] stable-diffusion.cpp:3485 - computing vae graph completed, taking 20.08s
[INFO] stable-diffusion.cpp:3508 - vae graph use 1759.64MB of memory: params 94.51MB, runtime 1665.14MB (static 1.14MB, dynamic 1664.00MB)
[DEBUG] stable-diffusion.cpp:3509 - 3145728 bytes of dynamic memory has not been released yet
[INFO] stable-diffusion.cpp:3598 - decode_first_stage completed, taking 20.09s
[INFO] stable-diffusion.cpp:3612 - txt2img completed in 251.95s, use 2316.26MB of memory: peak params memory 1969.97MB, peak runtime memory 1665.14MB
save result image to 'output.png'
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /