stable-diffusion.cpp/examples/common
Claude 9b4ff13d52
feat: apply --memory-guard to CPU backends using system RAM
The guard returned an empty sample for CPU backends, so a CPU-only run
could fill system RAM without the guard ever reacting. On the CPU, measure
system RAM instead: total minus the memory available without swapping,
plus the allocation the graph is about to make, against total physical
memory.

Under pressure the guard releases unpinned weights that can be re-read
from the model file (--params-backend disk). It never fails a graph on the
CPU, since system RAM has no managed capacity, and CPU pressure does not
suspend prefetch for GPU backends.

Expose available_ram_bytes() from backend_fit for the probe, and update
the CLI help, the public header comment and the docs.

Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
2026-10-11 04:51:58 +02:00
..
common.cpp feat: apply --memory-guard to CPU backends using system RAM 2026-10-11 04:51:58 +02:00
common.h Merge upstream leejet/stable-diffusion.cpp master into fix_to_claude 2026-10-11 04:26:15 +02:00
log.cpp refactor: escape newlines in prompt logs and clarify source separators (#2106) 2026-10-06 19:51:12 +08:00
log.h feat: add verbose logging and log-level selection (#1941) 2026-09-06 23:14:03 +08:00
media_io.cpp fix: add alpha channel input for Qwen Image 2.1 and relative docs (#2021) 2026-09-22 21:45:06 +08:00
media_io.h fix: add alpha channel input for Qwen Image 2.1 and relative docs (#2021) 2026-09-22 21:45:06 +08:00
resource_owners.hpp feat: add minimax-h3 support (#1854) 2026-08-04 23:14:18 +08:00