Draw Things distribuisce alcuni checkpoint in due file: un .ckpt di
pochi MB con la sola intestazione, e un .ckpt-tensordata con i pesi
(5-6 GB). Il check sui modelli usava una soglia fissa di 64 MB sul
solo .ckpt e segnalava quindi questi modelli come 'scaricati a metà',
anche quando i pesi erano integri accanto a lui.
Prima di dichiarare un modello troncato, il check ora guarda il
fratello <file>.ckpt-tensordata: se esiste ed è di taglia reale, il
modello è intero e la dimensione riportata è quella dei pesi.
Era la causa del messaggio 'manca qualche modello' persistente a
disco e installazione corretti.
'npm run test:e2e' was failing before it even started:
the four tests import { createJiti } from 'jiti' but jiti was never
declared in package.json, so Node threw ERR_MODULE_NOT_FOUND on the
first import. Adding it to devDependencies fixes the loader.
The same tests hard-coded the original developer's path
('/home/moze/Sorgenti/pi-imgen'), so even with jiti installed they
would have failed on any other checkout. Replacing it with
dirname(dirname(dirname(fileURLToPath(import.meta.url)))) lets the
suite run from wherever the repo is cloned.
The resident gRPC daemon is an optimisation, not a requirement:
draw-things-cli works fine cold (it just reloads 6GB of weights per call)
and index.ts's waitForServer() warms it on the first generation anyway.
A doctor that lists the engine under 'Qualcosa non va' makes a working
install look broken every morning and pushes the user to chase a non-issue.
All four reachable branches of checkServer — disabled, binaryMissing,
notExecutable, stopped — now return level: 'info'. The fix hint stays in
the report so the user can still copy the manual start command when they
want to.