stable-diffusion.cpp/scripts
Claude 65ccae284f
feat(scripts): add thermal diagnostics with an Italian guide
scripts/diagnostica_termica/ lets someone who wants to run the engine on
their own hardware see how hot it gets and why, without installing
anything beyond Python and the NVIDIA driver.

termico.py samples nvidia-smi (temperature, power, clocks, utilization,
memory and the throttling reasons) during a guided session in phases
(idle, engine, chat, both together), or continuously with `osserva`.
With --motore it adds, on the same timeline, what sd-server reports in
/sdcpp/v1/health and /resources (busy, queue, jobs succeeded, failed and
cancelled, profile step-downs, free memory). It writes a CSV, a JSON
summary (termico-riepilogo/1) and a text report, and `confronta` puts
several runs side by side (termico-confronto/1).

For other programs, `osserva --file-stato` keeps a file with the latest
reading (termico-stato/1, replaced atomically so a reader never sees half
of it) and `stato` prints one reading with exit codes 0, 1, 2 and 3.

Temperature bands start from the limits the driver declares (attention
10 C below the slowdown limit, critical 3 C below) or from 80 and 87 C
when it does not say. Bands and judgments are labeled as indicative, and
a judgment is given only for phases that involve the engine or the chat
and for observations of at least 180 seconds.

carico_motore.py makes sd-server generate continuously with always the
same job, so a run has a repeatable load. It honors Retry-After, sends the
API key only when asked, and stops its own job on Ctrl+C.

The README is a step-by-step guide in Italian: first run in two minutes,
the full run, reading the results, observing without phases, comparing,
what the files contain, what the program does on the PC, common problems
and how to share a run.

Checked with a fake nvidia-smi and fake engines (test/termico_test.py,
next commit) and against a real sd-server built for CPU with the
synthetic model. Not checked: a real NVIDIA GPU and driver output,
Windows, laptops with more than one GPU, sessions of many hours.

Claude-Session: https://claude.ai/code/session_01EhZzDBkuuMp1jBf4WtEySC
2026-10-14 23:35:52 +02:00
..
diagnostica_termica feat(scripts): add thermal diagnostics with an Italian guide 2026-10-14 23:35:52 +02:00
build-engine.ps1 test try CPU/GPU 2026-10-08 22:47:40 +02:00
build-engine.sh test try CPU/GPU 2026-10-08 22:47:40 +02:00
build-windows-gpu.ps1 test try CPU/GPU 2026-10-08 22:47:40 +02:00
convert_fp8_scale_to_bf16.py chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00
convert_qwen3_vl.py chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00
convert_sefi.py chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00
convert_yolov8_to_safetensors.py feat: add ADetailer support (#1785) 2026-07-14 23:59:11 +08:00
face_detect.py chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00
format-code.ps1 refactor: split generation pipeline out of stable-diffusion.cpp (#1957) 2026-09-11 00:57:14 +08:00
format-code.sh refactor: split generation pipeline out of stable-diffusion.cpp (#1957) 2026-09-11 00:57:14 +08:00
merge_safetensors.py chore: format code 2026-08-19 23:06:07 +08:00
package_portable.sh docs: require Visual C++ Redistributable 14.44 or newer on Windows 2026-10-12 15:54:33 +02:00
pulid_extract_id.py chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00
remove_utf8_bom.py chore: move utility scripts under scripts (#1746) 2026-07-05 18:48:18 +08:00