mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-21 09:52:03 -03:00
feat(versions): add View all local versions button to model versions tab
Clicking the button closes the modal, writes filter params to sessionStorage, and reloads the page to show all local versions of the model as individual cards (bypassing group-by-model dedup). The filter respects the update flag strategy and the versions-filter-toggle state (same-base vs all versions). Supporting changes: - sessionStorage keys vlm_model_id / vlm_model_name / vlm_base_model - BaseModelApiClient._addModelSpecificParams adds civitai_model_id param - LoraApiClient calls super._addModelSpecificParams for VLM detection - LorasControls / CheckpointsControls clearCustomFilter checks VLM first - PageControls.checkVlmFilter shows customFilterIndicator with label - Backend parses civitai_model_id, filters before group_by_model dedup
This commit is contained in:
@@ -1271,8 +1271,9 @@ export class BaseModelApiClient {
|
||||
|
||||
params.append('recursive', pageState.searchOptions.recursive ? 'true' : 'false');
|
||||
|
||||
// Pass group-by-model mode to backend
|
||||
if (state.global.settings.group_by_model) {
|
||||
// Pass group-by-model mode to backend (skip when showing all versions of a specific model)
|
||||
const vlmModelId = getSessionItem('vlm_model_id');
|
||||
if (state.global.settings.group_by_model && !vlmModelId) {
|
||||
params.append('group_by_model', 'true');
|
||||
}
|
||||
|
||||
@@ -1357,6 +1358,17 @@ export class BaseModelApiClient {
|
||||
}
|
||||
|
||||
_addModelSpecificParams(params, pageState) {
|
||||
// Check for View Local Versions filter (takes priority over recipe filters)
|
||||
const vlmModelId = getSessionItem('vlm_model_id');
|
||||
if (vlmModelId) {
|
||||
params.append('civitai_model_id', vlmModelId);
|
||||
const vlmBaseModel = getSessionItem('vlm_base_model');
|
||||
if (vlmBaseModel) {
|
||||
params.append('base_model', vlmBaseModel);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.modelType === 'loras') {
|
||||
const filterLoraHash = getSessionItem('recipe_to_lora_filterLoraHash');
|
||||
const filterLoraHashes = getSessionItem('recipe_to_lora_filterLoraHashes');
|
||||
|
||||
Reference in New Issue
Block a user