Fix Discover search returning nothing for niche base models #9

Merged
Nimby merged 1 commit from nimby/fix-discover-base-model-search into main 2026-09-23 11:27:08 -04:00 AGit
Collaborator

search_models(base_models=...) only ever fetched one page and
post-filtered it client-side. A default-sorted first page can easily
contain zero matches for a niche/newer base model even though real
matches exist a few pages in -- reported by the user searching "Anima"
in the Base model filter, reproduced against live civitai.com
(fetched_count=25, 0 matches on page 1; 6 real matches exist within 5
pages).

A fresh base-model-filtered search now auto-follows up to
MAX_BASE_MODEL_SEARCH_PAGES (5) pages looking for at least limit
matches. An explicit "Load more" click (cursor_url given) still
fetches exactly one page, matching what the click implies.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

search_models(base_models=...) only ever fetched one page and post-filtered it client-side. A default-sorted first page can easily contain zero matches for a niche/newer base model even though real matches exist a few pages in -- reported by the user searching "Anima" in the Base model filter, reproduced against live civitai.com (fetched_count=25, 0 matches on page 1; 6 real matches exist within 5 pages). A fresh base-model-filtered search now auto-follows up to MAX_BASE_MODEL_SEARCH_PAGES (5) pages looking for at least `limit` matches. An explicit "Load more" click (cursor_url given) still fetches exactly one page, matching what the click implies. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fix Discover search returning nothing for niche base models
All checks were successful
Build and Push / test (pull_request) Successful in 1m29s
Build and Push / build-and-push (pull_request) Has been skipped
6e3107dd8e
search_models(base_models=...) only ever fetched one page and
post-filtered it client-side. A default-sorted first page can easily
contain zero matches for a niche/newer base model even though real
matches exist a few pages in -- reported by the user searching "Anima"
in the Base model filter, reproduced against live civitai.com
(fetched_count=25, 0 matches on page 1; 6 real matches exist within 5
pages).

A fresh base-model-filtered search now auto-follows up to
MAX_BASE_MODEL_SEARCH_PAGES (5) pages looking for at least `limit`
matches. An explicit "Load more" click (cursor_url given) still
fetches exactly one page, matching what the click implies.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Nimby merged commit c24c19c38d into main 2026-09-23 11:27:08 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
scruffydude/comfy-gallery!9
No description provided.