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.
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.
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.
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.
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.
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.
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.
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.
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.
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