Skip to content

[Bug] Crash in case of incomplete command line (sd-cli + SD3.5) #1631

@akleine

Description

@akleine

Git commit

#f16a110

Operating System & Version

Ubuntu 24.04

GGML backends

CPU

Command-line arguments used

./sd-cli -m ~/SD_models/sd3/sd3.5_large-iq4_nl.gguf --steps 1

Steps to reproduce

Run above (incomplete) command line.

Some notes:

  1. AFAIK the bug was introduced with #f16a110 (Mar 29, 2026)
  2. The predecessor #ed88e21 (also Mar 29, 2026) is okay.
  3. The bug seems to be related with SD3.5 ( = MMDIT model )
    Running the above incomplete line with other models like SDXS (for example) is no problem.
  4. Perhaps there are more SD3.5 problems using #f16a110 and later , but I did not yet check them enough for a bug report.

What you expected to happen

Create any output.png (512x512) even the command line is incomplete.

Of course I've read the WARN msg:
[WARN ] conditioner.hpp:736 - IMPORTANT NOTICE: No text encoders provided, cannot process prompts!
but anyway sd--cli should not crash here.

What actually happened

Segmentation fault (core dumped)

Logs / error messages / stack trace

[INFO ] stable-diffusion.cpp:259  - loading model from '/home/xxx/SD_models/sd3/sd3.5_large-iq4_nl.gguf'
[INFO ] model.cpp:330  - load /home/xxx/SD_models/sd3/sd3.5_large-iq4_nl.gguf using gguf format
[INFO ] stable-diffusion.cpp:352  - Version: SD3.x 
[INFO ] stable-diffusion.cpp:380  - Weight type stat:                      f32: 192  |     f16: 394  |  iq4_nl: 581  
[INFO ] stable-diffusion.cpp:381  - Conditioner weight type stat:     
[INFO ] stable-diffusion.cpp:382  - Diffusion model weight type stat:      f16: 394  |  iq4_nl: 529  
[INFO ] stable-diffusion.cpp:383  - VAE weight type stat:                  f32: 192  |  iq4_nl: 52   
[WARN ] conditioner.hpp:736  - IMPORTANT NOTICE: No text encoders provided, cannot process prompts!
[INFO ] mmdit.hpp:679  - MMDiT layers: 38 (including 0 MMDiT-x layers)
[INFO ] stable-diffusion.cpp:669  - using VAE for encoding / decoding
  |==================================================| 1167/1167 - 908.17it/s
[INFO ] model.cpp:1558 - loading tensors completed, taking 1.29s (process: 0.00s, read: 0.69s, memcpy: 0.00s, convert: 0.09s, copy_to_backend: 0.00s)
[INFO ] stable-diffusion.cpp:881  - total params memory size = 4874.33MB (VRAM 0.00MB, RAM 4874.33MB): text_encoders 0.00MB(RAM), diffusion_model 4779.76MB(RAM), vae 94.57MB(RAM), controlnet 0.00MB(VRAM), pmid 0.00MB(RAM)
[INFO ] stable-diffusion.cpp:962  - running in FLOW mode
[INFO ] stable-diffusion.cpp:3075 - generate_image 512x512
[INFO ] denoiser.hpp:498  - get_sigmas with discrete scheduler
[INFO ] stable-diffusion.cpp:2657 - sampling using Euler method
[INFO ] stable-diffusion.cpp:3005 - get_learned_condition completed, taking 0.00s
[INFO ] stable-diffusion.cpp:3109 - generating image: 1/1 - seed 42
           ...........Segmentation fault (core dumped)

Additional context / environment details

CPU or CUDA ... that does not make a difference.

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