Commit Graph

14730 Commits

Author SHA1 Message Date
Vladimir Mandic 07320874d3 fix font paths
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 12:40:53 +02:00
Vladimir Mandic b7aa4b895a prompt cache prevent clear on task change
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 12:29:14 +02:00
Vladimir Mandic c038e2b21c update submodules
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 11:34:01 +02:00
Vladimir Mandic af16ef567c theme handle cli
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 09:34:10 +02:00
Vladimir Mandic d86916b8eb update installer
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 08:58:34 +02:00
Vladimir Mandic 9fe7170248 better handle git detached head
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 08:56:33 +02:00
Vladimir Mandic 2e3275bd40 update modernui
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 08:20:33 +02:00
Vladimir Mandic 28c20f6aa0 refactor theme loading
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-15 08:17:27 +02:00
Vladimir Mandic af69cb7a88 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-14 20:59:55 +02:00
Vladimir Mandic e4766f99dc minimax redo video/audio shift
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-14 20:41:02 +02:00
Vladimir Mandic 8691654bef cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-14 13:57:08 +02:00
Vladimir Mandic 516b9f4a45 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-14 12:11:52 +02:00
Vladimir Mandic cb7bc0faca fix grid with lora, add dlss framgen logging, add 8bit minimax variants
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-14 11:34:37 +02:00
Vladimir Mandic 129db5b49a Merge pull request #5089 from resonantsky/tree/dev/dev
More MIOpen script clean up
2026-09-14 11:28:38 +02:00
resonantsky 1ce26bc3fd Merge branch 'vladmandic:master' into tree/dev/dev 2026-09-14 11:03:57 +02:00
resonantsky 9411660053 MIOpen script clean up 2026-09-14 10:21:43 +02:00
Vladimir Mandic bc416b759c cleanup wildcard metadata
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-14 09:18:57 +02:00
Vladimir Mandic 808d7b77fe Merge pull request #5088 from CalamitousFelicitousness/refactor/json-helpers-path-lock
Refactor/json helpers path lock
2026-09-14 08:51:45 +02:00
CalamitousFelicitousness b3c78e9b56 fix(civitai): thumbnail video previews from the cdn's h.264 copy
CivitAI video covers are AV1, which OpenCV builds without dav1d cannot
decode. Previews fetch the CDN's transcode=true,width=450 H.264 copy
first, fall back to the original named by its content type, and drop a
video that yields no frame for the next media item. An unreadable frame
logs one line, and the download path is absolute before registration.
2026-09-14 04:00:38 +01:00
CalamitousFelicitousness 6d20ea0332 fix(civitai): keep civitai's reason on refused downloads
A refused download recorded only the status code and logged nothing.
The error now carries CivitAI's own message, as in "HTTP 403: Early
Access: ...", and the refusal and rename failure log like every other
branch.
2026-09-14 04:00:38 +01:00
CalamitousFelicitousness 9a6b7a1c93 fix(civitai): register a finished download with its loader list
A finished download refreshed the checkpoint list alone, so a new LoRA
or UNET stayed invisible to check-local and Networks until a manual
refresh. add_network, now module-level, registers one LoRA file; unet,
vae and checkpoint downloads run their loader's scan.
2026-09-14 04:00:38 +01:00
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 ef31ce70c7 refactor(civitai): seed the base-model filter from discovery only
search_civitai.base_models was a hand-kept copy of the /enums list that
lacked every base added this year. The dropdown starts empty and takes
the discovered names minus the bases CivitAI has retired (in BaseModel
but not ActiveBaseModel). The tab handler refreshes the choice lists on
every visit, since later browser sessions used to get no update; the
initial search still runs once per process.
2026-09-13 23:19:56 +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 b06b538104 feat(civitai): verify downloads in flight and cache under loader keys
The downloader hashes bytes as it writes them, seeding from the partial
on resume, and checks the declared SHA256 against that digest instead
of rereading the file. The declared hash, or the computed one when none
is given, is cached under the key the owning loader reads; loader_kind
and hash_cache_title derive that key for the downloader and the sweeps.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness cd86ea6321 fix(civitai): keep windows separators literal in save subfolder paths
resolve_save_path passed os.sep as the re.sub replacement string; on
Windows that lone backslash is an unfinished escape and every subfolder
download raised PatternError. A callable replacement is inserted
verbatim.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness 244db2e93e feat(civitai): retry overloaded search and log civitai error messages
An overloaded text search answers 503 with Retry-After, which send now
retries like a 429. Failure logs carry the server's error text with
ZodError issues flattened; a 404 from by-hash and a 401 from /me stay
quiet.
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 b10fefca77 feat(civitai): add batch hash lookups and 429 backoff to the client
Every API call goes through CivitaiClient.send, which caps concurrent
requests at shared.max_workers and retries 429 up to four times, using
Retry-After or exponential backoff up to 60s. New lookups wrap POST
/model-versions/by-hash/ids, POST /model-versions/by-hash and GET
/models?ids= within their caps and return a status per input whose chunk
failed; the ids query sends nsfw=true because it drops NSFW models
otherwise.
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 ca6ad175d6 fix(civitai): follow the stats and profile fields upstream
favoriteCount, ratingCount and rating are gone since reactions replaced
ratings, tippedAmountCount is new, and unreported counts arrive as null,
which a strict int field turned into a rejected search page. /me lost
its avatar and reports tier, status and isMember, with tier absent for
non-members; email, emailVerified and tokenScope stay unmodelled.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness 7c364b4554 feat(civitai): route text encoder, unet, clip and detection downloads
Eight live ModelType values had no TYPE_MAP entry and fell into the
checkpoint folder, where a detection or encoder model shows up in the
model picker. TextEncoder, UNet, CLIP, CLIPVision and Detection get
their own folders; LLM, VisionLanguage and ComfyWorkflows have none and
are logged once per session.
2026-09-13 23:19:56 +01:00
CalamitousFelicitousness a1614e6b2d refactor(civitai): derive hidden base models from the enums endpoint
The civitai repo dropped base-model.constants.ts, so the GitHub fetch
404ed and every call lost the group and hidden flags. /enums carries
ActiveBaseModel next to BaseModel; the difference is the retired set the
hidden flag marked.
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 6d5c63d9fe fix(hashes): snapshot the stores under a lock before saving the cache
save_cache handed writefile the live HashStore objects, so an add_hash
from another thread during the deep copy raised "dictionary changed
size during iteration" and dropped the save. The stores are now copied
under a lock that also covers the write, so a later save never lands
under an earlier snapshot.
2026-09-13 20:35:37 +01:00
CalamitousFelicitousness 6aeec2b6fe chore: drop fasteners from requirements
modules/json_helpers.py was its only user.
2026-09-13 19:20:10 +01:00
CalamitousFelicitousness 68c64fb4bc fix(json_helpers): write atomically by default and warn on empty reads
Every caller writes a whole JSON document, and a plain open/write can
leave a torn or empty file when the process dies or another writer
overlaps, which readfile then returns as {}. Writes now go through the
temp file and replace unless atomic=False or the mode is append. A read
waits out an open that Windows refuses while a replace of the same name
is in flight, and an empty file is reported when the read is not
silent, since a zero-byte config.json otherwise resets settings without
a trace.
2026-09-13 19:20:10 +01:00
CalamitousFelicitousness b39639ce2e fix(json_helpers): serialize file access per path within the process
The fasteners lock is inter-process only. On Linux fcntl record locks
belong to the process, so two threads writing the same file were never
serialized and could tear it; on Windows they were, until the lock
switched itself off. Every writer of these files runs inside one
multi-threaded process, so that is the case that matters.

readfile(lock=True) and writefile now take a re-entrant lock per
normalized path, held from the snapshot through the replace so writes
to one path land in call order. Other processes are covered by the
atomic replace. A .lock file left next to a JSON file by the old lock
is removed the first time that path is used.
2026-09-13 19:20:10 +01:00
Vladimir Mandic 77d368ea04 Merge pull request #5087 from CalamitousFelicitousness/fix/json-helpers-atomic-save
fix(json_helpers): make atomic saves work on windows, keep lock file
2026-09-13 20:01:35 +02:00
CalamitousFelicitousness cdc76c25c6 fix(json_helpers): make atomic saves work on windows, keep lock file
writefile(atomic=True) renamed the temp file while it was still open,
which Windows refuses, so every atomic save failed there and left a temp
file behind. The temp file is now created with mkstemp, closed before
os.replace and removed when the save fails; the replace retries briefly
when another handle holds the target, which Windows reports as a
permission error.

Both helpers removed the .lock file after releasing it. That removal
raced other holders on both platforms, and any failure switched locking
off for the whole process without a log line. The lock file now stays in
place; a failed release or a lock timeout is logged instead.

writefile deep-copied and validated the live object in Python, so a
concurrent insert into a shared dict raised "dictionary changed size
during iteration" and dropped the save. dict.copy and list.copy run
under the GIL, so the deep copy and the per-key validation now walk that
snapshot; nested containers remain the caller's responsibility.

test/test-json-helpers.py covers all three on Linux and Windows.
2026-09-13 18:41:33 +01:00
Vladimir Mandic 489cbf8048 lora: keep parsed network data through pipeline
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 16:31:16 +02:00
Vladimir Mandic a3b8a7e353 dlss handle errors
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 14:47:39 +02:00
Vladimir Mandic 1df487f01c dlss framegen align fps
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 14:46:21 +02:00
Vladimir Mandic 5ffc71bd39 increase progress timeout
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 13:59:24 +02:00
Vladimir Mandic 01e7897621 guard against null config
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 13:44:53 +02:00
Vladimir Mandic c3a75363b9 lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 13:08:34 +02:00
Vladimir Mandic 70beb1ee7c add minimax-nunchaku-lite
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 12:49:57 +02:00
Vladimir Mandic 03bc3159ec remove theme code from ext
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 11:24:08 +02:00
Vladimir Mandic e89f63b7e0 fix circular imports changing theme back to default
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-09-13 10:28:22 +02:00