mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-21 03:01:27 -03:00
fix(other-models): make clip_vision opt-in like controlnet
DEFAULT_ENABLED_OTHER_SUB_TYPES managed vae, upscaler, text_encoder and clip_vision while controlnet was the sole opt-in type. That split was not defensible on demand breadth: ControlNet is the broader category by install base, and clip_vision is the narrower one (IPAdapter/SVD image conditioning, usually one to three files) whose CivitAI type is retired upstream. Keep the default set to the dependency-style assets every pipeline needs and where "which one am I actually using" is the real problem - VAE, upscalers and text encoders - and treat clip_vision and controlnet symmetrically as opt-in. The feature is still unreleased, so the change needs no migration. - Sync all five surfaces holding a default: DEFAULT_ENABLED_OTHER_SUB_TYPES, DEFAULT_SETTINGS, both DEFAULT_SETTINGS_BASE/createDefaultSettings lists, updateOtherModelsControls()'s fallback and the Jinja fallback. - The selection is persisted per user, so only the untouched default moves; existing default_other_roots entries for a disabled sub_type are preserved. - Fix the Jinja fallback using `or`, which treated an all-unchecked empty allow-list as "unset" and re-checked every box on render; `is none` keeps the empty list empty. - Document the revised defaults and rationale in the plan. Tests assert the new default trio, the normalize fallback, that both opt-in types stay out of the default scan, and the auto-set iteration test now enables clip_vision explicitly since it exercises the loop, not the default.
This commit is contained in:
@@ -41,7 +41,10 @@
|
||||
|
||||
{{ sm.setting_toggle('enableOtherModels', 'enable_other_models', 'settings.folderSettings.enableOtherModels', 'settings.folderSettings.enableOtherModelsHelp') }}
|
||||
|
||||
{% set enabled_other_sub_types = settings.get('enabled_other_sub_types') or ['vae', 'upscaler', 'text_encoder', 'clip_vision'] %}
|
||||
{# 'is none' (not 'or') so an empty allow-list stays empty instead of
|
||||
falling back to the defaults and re-checking every box. #}
|
||||
{% set enabled_other_sub_types = settings.get('enabled_other_sub_types') %}
|
||||
{% if enabled_other_sub_types is none %}{% set enabled_other_sub_types = ['vae', 'upscaler', 'text_encoder'] %}{% endif %}
|
||||
<div class="setting-item other-subtype-toggles" id="otherSubTypeToggles">
|
||||
<div class="setting-row">
|
||||
<div class="setting-info">
|
||||
|
||||
Reference in New Issue
Block a user