v1.2 - Installed Tab Overhaul / Installed 分頁大改版
New Features / 新功能
Collapsible Folders sidebar with hamburger toggle
可收合的 Folders 側欄(漢堡選單切換)
The left-side Folders panel now collapses by default so the cards take the full row width. A ☰ button in the action row opens it as a floating overlay; clicking outside, toggling again, or picking a folder closes it.
左側 Folders 面板預設收起,卡片區佔滿整個橫向空間。動作列加入 ☰ 按鈕,點擊後 Folders 以浮動視窗形式滑出;再點一次、點視窗外、或選取資料夾後會自動收回。
Batch delete with checkbox + Select All
批次刪除(checkbox)與全選
Each Installed card now has a red checkbox in the top-left corner. Tick any number of cards and click 🗑️ Delete Selected to remove them — the model file, sidecars (.json / .preview.png / .preview.mp4 / .civitai.info) and, when no other version of the same model remains, the cached "Save Local" info folder are all sent to the recycle bin via send2trash. ✓ Select All in View picks every visible card in one click; clicking again clears the selection.
每張 Installed 卡片左上角有紅色 checkbox。任意勾選後按 🗑️ Delete Selected 一鍵刪除 — 含模型本體、所有 sidecar(.json / .preview.png / .preview.mp4 / .civitai.info),以及該模型沒有其他版本留存時的「Save Local」快取資料夾,全部透過 send2trash 送進資源回收桶。✓ Select All in View 一鍵全選目前篩選資料夾內的所有卡片,再點一次即取消。
Copy buttons inject <lora:filename:1> like Send
Copy 按鈕自動附加 <lora:filename:1>,與 Send 行為一致
In the model info popup, the 📋 Copy button on a sample image's prompt and the 📋 Copy All in Trigger Words now append <lora:filename:1> to the end when the model is installed locally, matching what the 📤 Send button does. Negative-prompt Copy intentionally omits the tag.
Model info 視窗中,Sample 圖片的 📋 Copy(prompt)與 Trigger Words 的 📋 Copy All 在模型已安裝時,會自動把 <lora:filename:1> 加在末端,與 📤 Send 按鈕一致。Negative prompt 的 Copy 不會加(避免錯放在反向提示中)。
Bug Fixes / 錯誤修復
Fix: Popup showed wrong preview & Trigger Words for multi-version models
修復:多版本模型 popup 顯示錯誤的 preview 與 Trigger Words
Root cause: clicking an Installed card sent only the modelId to the popup. With no version hint, get_model_info_html() fell back to versions[:5], displaying the first 5 versions instead of the one the user actually downloaded.
根本原因:點 Installed 卡片時只傳了 modelId 給 popup。少了版本提示,get_model_info_html() fallback 顯示前 5 個版本,而非使用者實際下載的那一個。
Changes:
- Installed cards now carry
data-version-idfrom their.jsonsidecar - Click handler sends
modelId:versionId_<rand>to the popup, restricting display to the matching version start_download()now forwardsversion_idto the download manager so new sidecars persist it correctly
變更內容:
- Installed 卡片從 sidecar 讀出
data-version-id - JS 點擊處理改傳
modelId:versionId_<rand>給 popup,只顯示對應版本 start_download()補上version_id傳給下載管理員,新下載的 sidecar 會帶正確版本資料
Fix: One version of a multi-version model was marking all versions "installed"
修復:多版本模型只下載一個版本卻全部被標記為「已安裝」
Root cause: the is_version_item install check fell back to model_id in installed_model_ids when no file matched. This fallback was meant for commission / restricted / Early-Access models with empty files[], but fired for any per-version card whose specific file wasn't on disk — causing every version to look installed once any single version was downloaded.
根本原因:is_version_item 安裝偵測在檔案沒對到時會 fallback 到 model_id in installed_model_ids。這個 fallback 原本是給沒有 files[] 的 commission / Early-Access 模型用的,卻誤觸發到一般多版本卡片 — 結果只要下載過任一版本,所有版本都被標成已安裝。
Changes:
- The model_id fallback now applies only when the version's
files[]is empty - Versions with real files use SHA / filename match exclusively, so each version's install status is independent
變更內容:
- model_id fallback 限縮為「該版本完全沒有
files[]」時才生效 - 有正常檔案資訊的版本只用 SHA / 檔名比對,每個版本獨立判斷
Performance / 效能
Installed-models scan is now cached in-process
Installed 模型掃描結果改為 in-process 快取
Previously every folder click ran two full disk walks of models/ + embeddings/ (reading every .json sidecar). With 2000+ models this took 3+ seconds even when the clicked folder contained one file. The scan result is now cached and only invalidated when needed:
之前每次點資料夾都會跑 2 次完整磁碟掃描(models/ + embeddings/,讀取所有 .json 邊車檔)。2000+ 模型時即使資料夾只有 1 個檔案也要等 3 秒。掃描結果改為快取,只在需要時失效:
-
Cleared on download-complete,
delete_model(), and the Refresh Folder Tree button -
get_installed_models_html()no longer triggers the Browse tab's hash refresh (which was unrelated to the Installed view) -
queue=Falseon installed event handlers skips Gradio's shared queue -
下載完成、
delete_model()、按下 Refresh Folder Tree 時清空快取 -
get_installed_models_html()不再呼叫 Browse tab 的 hash 快取更新(那跟 Installed 顯示無關) -
Installed 相關事件加
queue=False跳過 Gradio 共用佇列
Folder / sort clicks now run in <5 ms once the cache is warm.
快取就緒後,點資料夾 / 改排序 <5 ms 完成。
Layout polish / 介面微調
-
Cards area is height-capped (
110vh) with its own scroll — a 290-card folder no longer stretches the page -
Installed cards are left-aligned (Browse / Favorites stay centered)
-
Action-row buttons (Delete / Select All / ☰) match the Sort dropdown height
-
Sample images popup keeps the multi-version-aware preview / Trigger Words
-
卡片區固定高度(
110vh)獨立捲動 — 290 張卡片的資料夾不再撐高整頁 -
Installed 卡片靠左對齊(Browse / Favorites 保持置中)
-
動作列按鈕(Delete / Select All / ☰)高度與 Sort 下拉一致
-
Sample images popup 維持多版本對應的 preview / Trigger Words
Migration note / 遷移注意事項
If your existing .json sidecars were written by older builds, many likely have version_id missing or 0. With v1.2's version-aware popup, those models will fall back to showing the model's first 5 versions instead of the actual installed one. The model file, preview image, and "installed" detection are not affected — only the popup view of the affected models is degraded.
如果你的舊 .json sidecar 是更早版本擴充功能寫入的,其中很多會缺 version_id 或為 0。v1.2 的 popup 對這些舊資料會 fallback 顯示模型前 5 個版本,而不是實際安裝的版本。模型本體、preview 圖片、安裝偵測都不受影響 — 只有那些舊模型的 popup 顯示會降級。
A one-off audit utility is included: run python audit_version_ids.py from the extension folder to list affected sidecars (writes a UTF-8 report to audit_report.txt). Re-downloading the affected models via this extension regenerates clean sidecars.
附上一次性檢查工具:在擴充功能資料夾執行 python audit_version_ids.py 即可列出受影響的 sidecar(輸出 UTF-8 報告到 audit_report.txt)。透過本擴充功能重新下載受影響的模型,sidecar 會自動補正。
Previous Releases / 歷史版本
- v1.1.1 - Fix Copy / Copy All buttons silent failure / 修復 Copy 按鈕靜默失效
- v1.1.0 - Multi-version Cards & civitai.red Full Support / 多版本卡片 + civitai.red 完整支援
- v1.0.2 - Fix installed detection for commission/restricted models / 修復受限模型安裝偵測
- v1.0.1 - Initial release / 初始版本