From d26f8560c8f4e3917458365c976c35d0b87dce62 Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Mon, 23 Mar 2026 22:25:06 +0000 Subject: [PATCH] fix(dicts): move default dicts directory to data/dicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tag dictionaries are lookup data, not model weights — place them alongside cache.json and metadata.json in the data/ folder instead of inside the models directory. --- modules/api/api.py | 2 +- modules/ui_definitions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/api/api.py b/modules/api/api.py index 4505abbf7..fd47da3cd 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -120,7 +120,7 @@ class Api: # dicts api from modules.api import dicts as dicts_api - dicts_api.init(getattr(shared.opts, 'dicts_dir', '') or os.path.join(paths.models_path, 'dicts')) + dicts_api.init(getattr(shared.opts, 'dicts_dir', '') or os.path.join(paths.data_path, 'data', 'dicts')) dicts_api.register_api(self.app) # gallery api diff --git a/modules/ui_definitions.py b/modules/ui_definitions.py index ea8c6e68c..176257a52 100644 --- a/modules/ui_definitions.py +++ b/modules/ui_definitions.py @@ -54,7 +54,7 @@ def get_openvino_device_list(): def list_dict_names(): """Return list of available tag dictionary names (JSON filenames without extension).""" from modules import shared, paths as paths_module - dicts_dir = getattr(shared.opts, 'dicts_dir', None) or os.path.join(paths_module.models_path, 'dicts') + dicts_dir = getattr(shared.opts, 'dicts_dir', None) or os.path.join(paths_module.data_path, 'data', 'dicts') if not os.path.isdir(dicts_dir): return [] return sorted( @@ -400,7 +400,7 @@ def create_settings(cmd_opts): "lora_dir": OptionInfo(os.path.join(paths.models_path, 'Lora'), "Folder with LoRA network(s)", folder=True), "styles_dir": OptionInfo(os.path.join(paths.models_path, 'styles'), "File or Folder with user-defined styles", folder=True), "wildcards_dir": OptionInfo(os.path.join(paths.models_path, 'wildcards'), "Folder with user-defined wildcards", folder=True), - "dicts_dir": OptionInfo(os.path.join(paths.models_path, 'dicts'), "Folder with tag dictionaries", folder=True), + "dicts_dir": OptionInfo(os.path.join(paths.data_path, 'data', 'dicts'), "Folder with tag dictionaries", folder=True), "embeddings_dir": OptionInfo(os.path.join(paths.models_path, 'embeddings'), "Folder with textual inversion embeddings", folder=True), "control_dir": OptionInfo(os.path.join(paths.models_path, 'control'), "Folder with Control models", folder=True), "yolo_dir": OptionInfo(os.path.join(paths.models_path, 'yolo'), "Folder with Yolo models", folder=True),