20 Commits

Author SHA1 Message Date
CalamitousFelicitousness 7554389f2e fix(civitai): stop check-local from reporting deleted model files
A hash cache hit now resolves through its loader's registry and counts
only while the file exists; entries whose file is gone are pruned, on
the request that finds them and once per process for the rest.
filename is always the local path.
2026-09-14 04:00:38 +01:00
CalamitousFelicitousness 229db02b14 feat(civitai): show search failures in the models tab
CivitSearchResponse carries the server's error text; the Gradio page
renders it, or a no-results line, in the details area instead of a
blank card list. The legacy route reads items from the response.
2026-09-14 04:00:38 +01:00
CalamitousFelicitousness eb3a062339 feat(civitai): list every file of a version in the gradio model details
The versions table showed only files[0], so precision variants of one
version could not be downloaded. Each file gets its own row under
rowspan version cells, sorted by precision then size, with a variant
column and a star on the primary; rows download by fileId URL and All
variants queues each version's primary from the fetched model. Companion
files pass their own type, and save names carry the precision, then
full/pruned and the file id only when needed to stay unique.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness 0b59d2acc4 fix(civitai): identify models by file digest in batched metadata sweeps
The sweeps queried with the extra-networks shorthash, which for LoRA is
the kohya sshs_model_hash and never matches, and the update sweep
skipped every uncached checkpoint. Hashes now come from the default
hash store or from hashing the file, lookups are batched, hashing stops
on interrupt and honours --no-hashing, and one lock serializes both
sweeps with a second start answered by 409.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness 4cf734dbd6 feat(civitai): add the mini version endpoint
GET /sdapi/v2/civitai/version/mini/{id} exposes /model-versions/mini:
the primary file flattened onto the version, every hash, and the
permission flags a download needs. CivitVersionMini is its own model
because its field set is per-file, not per-version.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness 1701d6aa17 fix(civitai): route settings writes through the options setter
post_settings wrote opts.data directly, bypassing the __setattr__ hook
that files _token keys into secrets.json; a token saved through the
endpoint landed in config.json. The setter also applies the freeze and
restricted-key guards.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness 8291365955 refactor(model): simplify probe cache handling
json_helpers does its own error handling and file locking, so the
try/except wrappers, threading locks and isfile checks were dead
weight; probe cache file paths are now defined in paths.py.
2026-07-11 20:26:12 +01:00
CalamitousFelicitousness c54c0535c0 fix(civitai): accept civitai.red urls in header peek
The .red mirror rewrites downloadUrl to its own host; normalize to
civitai.com so the ssrf guard, cache hash and fetch host agree.
2026-07-11 20:26:12 +01:00
CalamitousFelicitousness 055388aa70 feat(civitai): attach model probe analysis to header peeks
peek-header now returns the full probe (architecture fingerprint,
dtypes, quant scheme) alongside the metadata block, and caches the
response persistently by civitai file id; file content per id is
immutable, so cached probes skip the ranged fetch entirely.
2026-07-11 06:40:07 +01:00
CalamitousFelicitousness e0ed573d66 feat(civitai): add ranged safetensors header peek endpoint
The API carries no field distinguishing dual-transformer expert files;
conversion tools embed it in the header __metadata__. peek-header
range-fetches the JSON header and returns the metadata block without
downloading the file. Restricted to civitai.com urls.
2026-07-11 06:40:07 +01:00
CalamitousFelicitousness 9b18aad1c1 feat(civitai): record search filters in history entries
History entries stored only the query or tag term, so restoring a
search dropped every filter, and filter-only browsing was never
recorded at all.

- SearchHistory.add takes an optional params dict stored on the entry
- get_search records non-default filters: type, sort, period, base
  models, nsfw, username, favorites
- filter-only searches are recorded as 'filter' entries labeled with
  the filter values
2026-07-10 00:50:01 +01:00
awsr e4aaed9eee Improve init & data handling. Improve typing.
Minor usage change. Instead of setting the hash info directly, call `add_hash` to ensure proper data structure.
2026-04-13 23:44:05 -07:00
vladmandic 15c8b2b0c4 fixes from check-api
Signed-off-by: vladmandic <mandic00@live.com>
2026-04-12 18:54:22 +02:00
awsr 53598d40ab RUF013 update 2026-03-23 22:59:32 -07:00
vladmandic 760b0121bc update register_api
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-20 08:07:05 +01:00
vladmandic 4e1c1a6844 add secrets manager
Signed-off-by: vladmandic <mandic00@live.com>
2026-03-17 13:56:55 +01:00
vladmandic ea1abfe2ce merge: modules/civitai 2026-03-17 11:07:51 +01:00
Vladimir Mandic d41bf3d673 add api to trigger civitai metadata update
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-09-21 20:06:45 -04:00
Vladimir Mandic 692c236831 modernui updates
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-05 13:28:55 -04:00
Vladimir Mandic 66456f3b4f civitai search redesign prototype
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2025-08-04 15:53:43 -04:00