Skip to content

Releases: acer1204/CivitAI-Manager-Plus

v1.2.2 - URL Paste Bypass / 貼 URL 直取單一模型

14 Jun 17:14

Choose a tag to compare

Bug Fix / 錯誤修復

Pasted CivitAI URL now fetches the model directly (works for minor-flagged models)
貼 CivitAI 網址改用直接拉取單一模型(支援 minor 標記的模型)

Pasting a model URL (e.g. https://civitai.com/models/1727234/...) in the Browse search box used to set ?ids=<id> on the /api/v1/models list endpoint. This worked for ordinary models but silently returned zero results when the target was flagged minor=True by CivitAI's content policy — the list endpoint filters those out server-side regardless of ?ids=, so users hit "No models found" with no indication the model actually existed and was publicly available.

在 Browse 搜尋框貼上 model 網址(例如 https://civitai.com/models/1727234/...)之前的做法是把 ID 塞進 /api/v1/models?ids=<id> 的清單端點。對一般模型沒問題,但只要對方被 CivitAI 內容政策標記 minor=True,清單端點就會在 server 側過濾掉,不管你怎麼帶 ?ids= 都拿到空結果 — 使用者只會看到「No models found」,完全沒線索知道那個模型其實是公開、可下載的。

Changes:

  • URL pastes now bypass the list endpoint and call /api/v1/models/{id} directly. CivitAI exposes this per-model endpoint for explicit fetches and it returns the model regardless of minor flag.
  • The single result is wrapped to look like a normal search response so card rendering / download flows are unchanged.
  • All other filters (Content type, Base model, Category, Filter by user, Sort by, etc.) are intentionally ignored when a URL is detected — pasting a specific URL is treated as "I want exactly this one".

變更內容:

  • 貼 URL 時改走 /api/v1/models/{id} 單一模型端點,跳過清單端點。CivitAI 對單一模型端點的公開存取套用 minor 過濾。
  • 單一結果會被包成跟一般搜尋一樣的回應,卡片渲染、下載邏輯都不需要改。
  • 偵測到 URL 時,所有其他 filter(Content type、Base model、Category、Filter by user、Sort by 等)全部刻意略過 — 既然你貼的是特定 URL,代表「就要這個」,不需要再被過濾掉。

Notes / 補充說明

This patch only changes behavior for URL pastes; normal text searches keep using the list endpoint with all your filters as before. The minor flag is a CivitAI server-side content-policy filter — there is no public API path to search or enumerate minor-flagged models. Pasting a known URL is the only supported access pattern.

此 patch 只影響「貼 URL」的行為,一般文字搜尋仍然走清單端點搭配你選的 filter,沒有任何改變。minor 旗標是 CivitAI 在 server 端套的內容政策過濾 — 公開 API 沒有任何路線可以搜尋或列舉 minor=True 的模型,「已知 URL 直接拿」是唯一支援的存取方式。

Previous Releases / 歷史版本

  • v1.2.1 - Browse Filters + Selection Performance / Browse 過濾器擴充 + 選取效能
  • v1.2 - Installed Tab Overhaul / Installed 分頁大改版
  • 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 / 初始版本

v1.2.1 - Browse Filters + Selection Performance / Browse 過濾器擴充 + 選取效能

23 May 07:19

Choose a tag to compare

New Features / 新功能

Browse Filters: Category multi-select
Browse 過濾器:Category 多選

A new "Category" dropdown in Browse > Filters exposes the same chips civitai.red shows in its frontend search UI: Action, Animal, Assets, Background, Base Model, Buildings, Celebrity, Character, Clothing, Concept, Objects, Poses, Style, Tool, Vehicle. Multi-select is wired to repeated ?tag= query parameters (mirrors the website's ?category=). Combines AND with Search by: Tag — both feed the same tag list.

Browse 的 Filters 區新增「Category」下拉,選項對應 civitai.red 前端搜尋頁的同一組 chips:Action / Animal / Assets / Background / Base Model / Buildings / Celebrity / Character / Clothing / Concept / Objects / Poses / Style / Tool / Vehicle。支援多選,送 API 時用 repeated ?tag= 參數(對應網頁的 ?category=)。若同時用 Search by: Tag,兩邊的 tag 會合併以 AND 篩選。

Browse Filters: Filter by user
Browse 過濾器:Filter by user

A new "Filter by user" textbox lets you narrow results to a specific creator independent of the search box (mirrors the website's ?users= chip). When the search box and this field contain the same string, the duplicate ?query= is dropped (public API's query= only matches model name / description, not username — sending both would AND-restrict to almost zero results).

Filters 區新增「Filter by user」文字框,可獨立於搜尋框指定創作者(對應網頁的 ?users= 過濾)。當搜尋框跟此欄位填同樣字串時,會自動省略 ?query=(公開 API 的 query= 只比對 model 名稱 / 描述,不比對 username,同時送兩個會 AND 到幾乎零筆)。

NSFW: Checkbox → Yes/No dropdown
NSFW:從 Checkbox 改為 Yes/No 下拉

Visual height now matches the Sort / Period dropdowns next to it. Backend still stores as a boolean for backward compatibility with existing search_config.json.

外觀高度跟旁邊的 Sort / Period 下拉一致。後端仍存 bool,跟既有的 search_config.json 相容。

Performance / 效能

Smoother card selection — no more re-render flash
卡片勾選不再閃爍

Clicking a checkbox in Browse or Installed no longer re-renders the cards grid. Previously every toggle posted updated HTML for the whole grid, which:

  • flashed a Gradio "loading" overlay on the cards container
  • reloaded every image and video in the grid
  • reset the scroll position to the top

Now the JS already flips the checkbox visual state on click, and the backend updates the selection set silently (outputs=[]). The next render that does touch HTML (Select All / page change / new search / delete) picks up the latest state from _selected_model_ids or _selected_installed_paths.

Browse 或 Installed 點 checkbox 時,卡片區不再整個重畫。之前每點一下就會:

  • 卡片容器閃一下 Gradio 的「loading」遮罩
  • 所有圖片和影片重新載入
  • scroll 位置被拉回最頂

現在 JS 點下去當下就翻轉 checkbox 視覺狀態,後端只靜默更新選取集合(outputs=[])。下次真的需要動 HTML(Select All / 翻頁 / 新搜尋 / 刪除)時自然會從 _selected_model_ids_selected_installed_paths 讀到最新狀態。

Off-screen card videos pause automatically
離畫面的卡片影片自動暫停

<video autoplay loop muted> card previews kept decoding frames even when scrolled out of view — with 50–100 autoplay videos on a page, the constant decode work was choking scroll performance and causing visible flicker. An IntersectionObserver now pauses any card video that's not on-screen and resumes it when it scrolls back into view. A MutationObserver picks up new videos whenever Gradio re-renders the cards.

<video autoplay loop muted> 卡片預覽就算捲出視窗也會持續 decode,一頁 50-100 支同時播時嚴重拖累滾動效能、引發畫面閃爍。新增 IntersectionObserver:離畫面的影片自動暫停,捲回視野時再播。另用 MutationObserver 監聽 Gradio 重新渲染卡片時自動接管新插入的 video。

Bug Fixes / 錯誤修復

Preview image 404 → "No Preview" instead of broken image
預覽圖 404 → 顯示「No Preview」而非破圖

Some versions of a multi-version model have images[] entries with empty URLs, or URLs that 404 on CivitAI's CDN. Cards previously showed a broken-image icon. Now:

  • Card rendering walks images[] and skips entries with missing URL.
  • Each <img> / <video> carries an inline onerror handler that swaps the element for a "No Preview" placeholder div when the asset actually fails to load.

部分多版本模型的 images[] 內含空 URL,或 URL 在 CivitAI CDN 上 404。卡片之前會顯示破圖。修法:

  • 渲染時逐一檢查 images[],跳過沒有 URL 的條目
  • 每個 <img> / <video>onerror handler,實際載入失敗時自動換成「No Preview」placeholder

Notes on web vs API search / 網頁與 API 搜尋的差異

civitai.red's /search/models page uses a Meilisearch backend that fuzzy-matches a single query across model name, description, tags, trained-words and creator username. The public /api/v1/models endpoint used by this extension only matches query= against model name (and possibly description), so the same search term can yield very different result counts between the website and the extension. To find all models by a creator use Search by: User name or fill Filter by user; for tag-like queries (e.g. "nipple", "cat ears") use Search by: Tag.

civitai.red 的 /search/models 頁面用 Meilisearch 後端,一個 query 會模糊比對 model 名稱、描述、tags、trained-words 跟創作者名稱。本擴充功能用的公開 /api/v1/models 端點 query= 只比對 model 名稱(可能含描述),所以同一個搜尋字在網頁跟擴充功能的結果筆數可能差很多。要找某創作者的全部作品請用 Search by: User name 或填 Filter by user;要找像 tag 的關鍵字(例如「nipple」、「cat ears」)請改用 Search by: Tag

Previous Releases / 歷史版本

  • v1.2 - Installed Tab Overhaul / Installed 分頁大改版
  • 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 / 初始版本

v1.2 - Installed Tab Overhaul / Installed 分頁大改版

21 May 12:28

Choose a tag to compare

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-id from their .json sidecar
  • Click handler sends modelId:versionId_<rand> to the popup, restricting display to the matching version
  • start_download() now forwards version_id to 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=False on 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 / 初始版本

v1.1.1 - Fix Copy buttons in model info popup

30 Apr 05:35

Choose a tag to compare

Bug Fixes / 錯誤修復

Fix: Copy / Copy All buttons in model info popup had no effect when clicked
修復:model info 視窗中的「📋 Copy」與「📋 Copy All」按鈕點擊後完全無反應

Root cause: navigator.clipboard.writeText() throws a synchronous TypeError when the Clipboard API is unavailable (e.g., HTTP without browser permission). The .catch() handler only intercepts rejected Promises, not synchronous errors — resulting in a completely silent failure with no feedback.

根本原因:在 HTTP 環境或瀏覽器未授予 clipboard 權限時,navigator.clipboardundefined,呼叫 .writeText() 會同步拋出 TypeError.catch() 只能攔截 rejected Promise,無法攔截同步錯誤,導致點擊後靜默失敗、無任何回饋。

Changes:

  • Added _copyTextToClipboard() helper: tries modern navigator.clipboard API first, falls back to document.execCommand('copy') for HTTP environments
  • Wrapped the call in try-catch to handle synchronous errors from the Clipboard API
  • On failure, displays an alert with the text so users can copy manually

變更內容:

  • 新增 _copyTextToClipboard() helper:優先使用 navigator.clipboard,不可用時自動 fallback 到 document.execCommand('copy')(適用 HTTP localhost 環境)
  • try-catch 包住整個呼叫,確保同步錯誤也能被攔截
  • 失敗時顯示 alert 並附上文字,方便手動複製

Previous Releases / 歷史版本

  • 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 / 初始版本

v1.1.0 - Multi-version Cards & civitai.red Full Support

16 Apr 13:36

Choose a tag to compare

New Features / 新功能

Multi-version cards (Approach B): Models with multiple versions are expanded into individual cards in Browse
多版本卡片(方案 B):在 Browse 搜尋結果中,多版本模型(如角色包)會展開成獨立卡片,同一模型的卡片顯示 🔗 圖示

Version-specific popup: Clicking a version card shows only that version's preview images and trigger words
版本專屬 Popup:點擊特定版本卡片時,model info 視窗只顯示該版本的 preview 圖片與 trigger words

Switch API to civitai.red for full NSFW/Explicit model support
API 端點切換至 civitai.red,支援完整的 NSFW / Explicit 模型搜尋與顯示

Support pasting civitai.red URLs directly into the search box
搜尋框支援直接貼入 civitai.red 網址進行查詢

Bug Fixes / 錯誤修復

Fix: API key not sent for civitai.red download URLs, causing Explicit model downloads to fail
修復:civitai.red 下載網址未帶入 API Key,導致 Explicit 模型無法下載

Fix: Protocol-relative downloadUrl (//civitai.com/...) from CivitAI API causing Invalid URL error
修復:CivitAI API 回傳的 downloadUrl 為 protocol-relative 格式(//civitai.com/...),導致下載報錯 Invalid URL

Fix: Protocol-relative URL in redirect Location header causing download failure
修復:下載 redirect 的 Location header 同樣為 protocol-relative 格式,導致下載失敗

Fix: Model info popup layout broken by special characters in prompts (lora:... etc.)
修復:preview 圖片的 prompt 含有 <lora:...> 等特殊字元時,model info 視窗版面崩潰

Previous Releases / 歷史版本

  • v1.0.2 - Fix installed detection for commission/restricted models / 修復受限模型安裝偵測
  • v1.0.1 - Initial release / 初始版本

v1.0.2 - Fix installed detection for commission/restricted models

14 Apr 05:47

Choose a tag to compare

Bug Fixes

Fix: Commission/restricted models not showing as installed in Browse tab
修復:[COMMISSION] 等受限模型下載後在 Browse 分頁仍顯示未安裝的問題

Root Cause / 根本原因

The CivitAI search API omits files[] data for restricted/commission/early-access models.
CivitAI 搜尋 API 對受限存取的模型(如 [COMMISSION]、Early Access)不返回 files[] 文件資訊。

The old installed check relied only on SHA256 hash and filename — both sourced from files[].
舊版的安裝判斷只靠 SHA256 哈希值與文件名比對,兩者都來自 files[]。

When files[] is empty, both checks always failed, making downloaded models appear as not installed.
當 files[] 為空時,兩種判斷都會失敗,導致已下載的模型仍顯示未安裝。

Fix / 修復方式

scan_installed_models() now also collects model_id from each model's .json metadata file saved at download time.
scan_installed_models() 現在額外從下載時保存的 .json 元數據文件中收集 model_id。

Installed check now first matches by model_id before falling back to SHA256/filename.
安裝判斷現在優先以 model_id 比對,再回退到 SHA256 / 文件名比對。

Any model whose .json contains a valid model_id will be correctly detected as installed.
任何 .json 包含有效 model_id 的模型都能被正確識別為已安裝。

v1.0.1

02 Apr 18:12

Choose a tag to compare

🔑 Trigger Words Tab / Trigger Words 分頁

Added a third tab in the model info popup for trigger words.
在 Model Info 彈出視窗新增第三個分頁,顯示模型的觸發詞。

Each trainedWords element is shown as a separate numbered block (Trigger example 01, 02…).
每個觸發詞群組以獨立編號區塊呈現(Trigger example 01、02……)。

Words are displayed as chips with an orange Copy All button per group.
個別觸發詞以 Chip 標籤顯示,每組附橘色 Copy All 一鍵複製按鈕。

Shows "No trigger words provided" if the model has none.
若模型未提供觸發詞則顯示對應提示。


📤 Send to txt2img Overhaul / Send to txt2img 全面修復

Prompt text is now set directly into the textarea, preserving original spacing and formatting.
Prompt 文字直接寫入 textarea,完整保留原始空格與格式,不再被 A1111 paste 壓縮。

Hires. fix checkbox is automatically enabled after Send if Hires params are present.
若 geninfo 包含 Hires 參數,Send 後自動勾選 Hires fix checkbox,確保設定正確套用。

LoRA tag is moved to the end of the positive prompt to prevent CLIP token position shifts.
LoRA tag 移至正向 Prompt 尾端,避免 CLIP tokenizer 位移導致與 CivitAI 預覽圖不一致。

If the LoRA tag is missing from the prompt, it is automatically appended to the end.
若 prompt 中未含 <lora:檔名:1>,Send 時自動補至尾端。

Hires upscaler, Hires upscale, Hires steps, and Denoising strength are now included in geninfo.
geninfo 現已涵蓋 Hires upscaler、Hires upscale、Hires steps 與 Denoising strength 等參數。